osgi

Service and Component in OSGI

女生的网名这么多〃 提交于 2020-01-17 14:02:10
问题 I have some little silly doubts in an OSGI concepts but they need to be clarified to have better understanding of concepts. Can anybody tell me what is the difference between OSGI Service and Component. What i know is that Service is like an interface file in java that can be used either by a different service or by a component. While component is like a particular implementation of the service. Please let me know if i am wrong or suggest some link from where i can get the things nicely. 回答1:

Service and Component in OSGI

六眼飞鱼酱① 提交于 2020-01-17 14:02:09
问题 I have some little silly doubts in an OSGI concepts but they need to be clarified to have better understanding of concepts. Can anybody tell me what is the difference between OSGI Service and Component. What i know is that Service is like an interface file in java that can be used either by a different service or by a component. While component is like a particular implementation of the service. Please let me know if i am wrong or suggest some link from where i can get the things nicely. 回答1:

How to manage dependencies when developing OSGI bundle in Netbeans and Karaf?

China☆狼群 提交于 2020-01-17 04:16:06
问题 I'm struggling to wrap my head around developing OSGI bundles to publish to Karaf. I'm using Netbeans 7.4 and the Create Maven OSGI bundle when creating a new project. I think what I'm wrestling with is dealing with dependencies between different projects and working with them in Netbeans and then publishing to Karaf. What I'm trying to do is set up a REST web service; I found this tutorial to be a good starting point in getting something basic up and running. So I started setting up a parent

How to get a bundle-object returned by a service out of the Equinox framework - java.lang.LinkageError

巧了我就是萌 提交于 2020-01-16 16:47:09
问题 I have a class which runs an Equinox framework. Now I would like to get an Object (defined in one of the bundles) that is returned by a service out of the framework. Unfortunately, I get a LinkageError and have no idea how to get rid of it. Is it even possible to let a service return a proper object to non-bundle code? Here is the full story: ParserDTOBundle is a bundle that defines the class ParserDTO and exports the corresponding package. In another bundle, ParserServiceBundle, I define a

Track files changes done by eclipse cleanup programmatically

时光总嘲笑我的痴心妄想 提交于 2020-01-14 05:12:27
问题 I have written one eclipse osgi plugin that runs cleanup and formatting actions on java files present in eclipse project. Some thing like: Run batch file that has eclipse command It open's eclipse editor Loads eclipse project passed as parameter in batch command Run cleanup and formatting actions Closes eclipse Now my problem is I need to track the files that has been changed by this action. I am performing cleanup changes using cleanUpsAction that runs as thread over multiple files and forks

OSGi console not shown in command line

痞子三分冷 提交于 2020-01-14 04:47:04
问题 I'm trying to get an OSGi example application working, but I'm running into trouble while starting OSGi from the command line. Note that I don't want to run the bundle in the Eclipse OSGi environment. This works fine. First, I created the example bundle. Afterwards, I tried to run the the application in the command line. To do so, I run the OSGi jar as stated in the above-mentioned article, official instructions and a related question: $ cd $ cp /usr/local/eclipse/plugins/org.eclipse.osgi_3.8

Does Karaf support downloading of transitive dependencies from maven central?

拥有回忆 提交于 2020-01-13 20:40:49
问题 I am trying to use Karaf and I was wondering if it is possible to configure it to pull the transitive dependencies from the Apache Maven Central repository. Without having to use "embedded bundles" I already know you can pull explicit dependencies, the key part of the the question is the "transitive" ones. I also know you can use OBR to read from a repository.xml file in a deployed site, but I can't find one for Maven central. A possible answer to the question would be to add the URL, but I

How to include resource file into osgi bundle from jar dependency with bnd/maven-bundle-plugin?

◇◆丶佛笑我妖孽 提交于 2020-01-13 11:33:32
问题 I'm using maven-bundle-plugin ( bnd effectively). It's straightforward to include a resource file from sources. For example, a resource file ( src/main/resources/some.xml ) is moved under target directory ( target/classes/some.xml ) during build time and can be included into the bundle using <Include-Resource> instruction: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>3.0.1</version> <extensions>true</extensions> <configuration>

OSGI Bundle vs jar dependency

∥☆過路亽.° 提交于 2020-01-13 08:57:09
问题 I'm trying to understand the difference between the following <dependency> <groupId>com.myspace.order</groupId> <artifactId>dal</artifactId> <version>1.0.0-SNAPSHOT</version> </dependency> AND <dependency> <groupId>com.myspace.order</groupId> <artifactId>dal</artifactId> <version>1.0.0-SNAPSHOT</version> <type>bundle</type> </dependency> The dal artifact itself has packaging specified as bundle as: <packaging>bundle</packaging> Now when I deploy the dal artifact, I see it published in the

Is Apache Aries running in Felix?

社会主义新天地 提交于 2020-01-13 07:00:28
问题 I'm trying to build a Blueprint bundle to run in Apache Felix. I tried to make it running but I didn't succeed. The blueprint bundle works fine in Karaf but not in Felix. Is it any documentation or a running example on the web to explain how to run a Blueprint bundle only with plain Felix. I suppose I have to manually add Aries to Felix platform but it didn't seem to work. To be more precise, I want a simple service to see that it's loaded from a blueprint.xml XML config file as a Blueprint