osgi

Camel in OSGi Container: Apply InterceptStrategy to all camel contexts

醉酒当歌 提交于 2019-12-21 06:53:03
问题 I have several bundles (A, B, and C) deployed to an OSGi container, each containing a CamelContext and some routes. I have another bundle (M) with a CamelContext with a route (for collecting monitoring data) and a InterceptStrategy bean. I would like the InterceptStrategy bean from M to automatically apply to all of the other CamelContext s in the container (i.e., those in A, B, and C), without having to modify the other bundles. Ultimately, the goal is to wiretap data from each CamelContext

Register ServletContainer programmatically in Osgi

回眸只為那壹抹淺笑 提交于 2019-12-21 05:14:20
问题 I'm developing a JAX-RS application with OSGI where resources are loaded dynamically. For this, I need to register the ServletContainer programmatically, then I can call the method ServletContainer.reload (ResourceConfig). I'm running on OSGI environment with support for servlet 3.x, using PAX-WEB 3.0.2 and Jersey 2.4. The problem is when I want to access a resource that implements Server Sent Event, Jersey raises an error that does not support asynchrony because it runs in a Servlet 2.x.

Embed thirdparty JAR using BND

南楼画角 提交于 2019-12-21 04:32:10
问题 I have an OSGi bundle that is built using ANT and the classic BND tool. My bundle uses a library (JAR) internally, which is not available as a bundle within my OSGi container (Apache Felix). So, I am trying to embed it within my bundle , for access at runtime. How can I embed such a library/JAR using ANT+BND? (Note : I cannot use MAVEN, using which this could have been a lot easier) 回答1: You need two instructions in your bnd descriptor. First use Include-Resource to include the target JAR

Gemini and Apache Aries blueprint container

假如想象 提交于 2019-12-21 04:14:36
问题 Gemini is the reference implementation for OSGi blueprint container, and Apache Aries is another blueprint container that is widely used...including within Apache Karaf. If I'm starting a new project (with open source technologies as a requirement) and plan to use blueprint, what should be my considerations when choosing between these two? Is the choice based on what OSGi container will be used, where: for Virgo then Gemini is your best/only? blueprint container choice for Apache Karaf, then

What is a p2 repository?

你离开我真会死。 提交于 2019-12-21 04:13:08
问题 I'm working on a project now for a few months where we use "p2-repositories". I know that I get my dependencies from them. But now I want do dive deeper into the subject and I wonder what exactly is a p2-repository - the definition. I think it has something to do with OSGi and with Nexus. But where does it come from? Am I bound to Nexus when I use p2 repositories? Or is this the common standard from OSGi? Or Eclipse/Maven/Tycho? Why do I need p2-repositories, when I can have Maven? Or why can

How can I manage OSGi build dependencies?

安稳与你 提交于 2019-12-21 03:53:05
问题 We've embedded an OSGi runtime (Equinox) into out custom client-server application to facilitate plugin development and so far things are going great. We've been using Eclipse to build plugins due to the built-in manifest editor, dependency management, and export wizard. Using Eclipse to manager builds isn't very conducive to continuous integration via Hudson. We have OSGi bundles which depend on other OSGi bundles. I'd really hate to hardcode build order in a custom ANT build. We've done

What's the difference between features in Karaf and OBR

自古美人都是妖i 提交于 2019-12-21 03:40:43
问题 I am looking into ways to deploy and update an OSGI (Karaf, specifically) application. It seems that there are several options. One is to use The OSGi Bundle Repository (OBR), another is to use Features in Karaf, and the third is to use Karaf Cave. I'm not really sure how these options are really different. They all seem to be doing the same things. Are they just different implementations of the same functionality? Could someone please explain the differences or provide some recommendations?

What's the difference between features in Karaf and OBR

◇◆丶佛笑我妖孽 提交于 2019-12-21 03:40:10
问题 I am looking into ways to deploy and update an OSGI (Karaf, specifically) application. It seems that there are several options. One is to use The OSGi Bundle Repository (OBR), another is to use Features in Karaf, and the third is to use Karaf Cave. I'm not really sure how these options are really different. They all seem to be doing the same things. Are they just different implementations of the same functionality? Could someone please explain the differences or provide some recommendations?

Unit-Testing OSGi-Components

青春壹個敷衍的年華 提交于 2019-12-21 03:38:07
问题 I'm currently thinking of "How to design an OSGi component so that it's easy to write tests for it with frameworks like jUnit and Mockito" . Mocking inter-bundle-dependencies is quite easy since OSGi strengthens the DIP (Dependency Inversion Principle) and injector-methods (e.g. setter) usually exist. But what about bundle internal dependencies? For example look at this case. Now I want to bring it into an OSGi context... Image we want to provide any kind of network protocol as a declarative

Good way to “wrap” jars for OSGi with Maven

折月煮酒 提交于 2019-12-21 02:34:10
问题 I was looking at the PAX tools on OPS4J for example: this one and I thought I'd found a nice way to: Specify an artifact Create an assembled jar (jar that contains all dependencies) from that jar and its transitive dependencies Wrap it with BND to create an OSGi bundle It turns out, that I was wrong - it doesn't appear that the PAX stuff does this. (RTFM, right? :) ) But this got me wondering: is there something out there that does what I'm asking? I've thought maybe I could do this by