osgi

Multithreaded bundle and service instances

我是研究僧i 提交于 2020-01-25 10:40:08
问题 Assume I have 3 bundles A , B and B1 . Bundle A is the starting point of my application. Bundle B provides the API of the service used by A . Bundle B1 is an implementation of the service. Basically, bundle A has a set of records that it processes one after the other. There is no order for processing the records. I would like to improve performance of my application by processing subsets of records concurrently. I thought about two different ways: multiple instances of bundle A and, bundle A

Eclipse: how to export a folder in a plugin

99封情书 提交于 2020-01-25 07:18:19
问题 I have a plugin containing a folder with files the plugin uses. I have noticed the folder is not exported in the plugin jar during its export. I guess there has to be some configuration I am missing but I can't find where it is. 回答1: Go to MANIFEST.MF editor and in the Build tab you need to add the directory to the "Binary Build" (This is the Gui way of what Michal Borek said. Both will have the same result) 回答2: You need to add this folders to build.properties file in bin.includes section.

Eclipse: how to export a folder in a plugin

旧街凉风 提交于 2020-01-25 07:18:05
问题 I have a plugin containing a folder with files the plugin uses. I have noticed the folder is not exported in the plugin jar during its export. I guess there has to be some configuration I am missing but I can't find where it is. 回答1: Go to MANIFEST.MF editor and in the Build tab you need to add the directory to the "Binary Build" (This is the Gui way of what Michal Borek said. Both will have the same result) 回答2: You need to add this folders to build.properties file in bin.includes section.

“Unsatisfied native code filter” when exporting OSGi bundle containing native Android lib

风格不统一 提交于 2020-01-25 03:34:24
问题 I try to create an OSGi bundle using native C/C++ code for deployment on an Android device running Felix. I was able to compile the native code and link it to a shared object using the Android NDK arm-linux-androideabi toolchain. Now, I try to export the OSGi bundle to a .jar file using eclipse PDE (Export->Deployable plug-ins and fragments). This fails. The error-window popping up tells me: 'Export Plug-ins' has encountered a problem. Processing inclusion from feature org.eclipse.pde

ResourceResolverFactory and SlingRepository null in Service class

泪湿孤枕 提交于 2020-01-25 01:54:08
问题 I have a Service class as below which I deployed using Maven and is Active on Sling Web Console. When I am accessing the method getSearchAssetNames() from this bundle it is getting called as per the AEM 6.0 logs on Authoring instance. But, implicit objects such as repository, resource resolver factory, query builder are all getting null pointer exceptions through how I have derived them using @Reference annotation. Here is the code for the class. I have tried removing activate, deactivate

ResourceResolverFactory and SlingRepository null in Service class

耗尽温柔 提交于 2020-01-25 01:54:02
问题 I have a Service class as below which I deployed using Maven and is Active on Sling Web Console. When I am accessing the method getSearchAssetNames() from this bundle it is getting called as per the AEM 6.0 logs on Authoring instance. But, implicit objects such as repository, resource resolver factory, query builder are all getting null pointer exceptions through how I have derived them using @Reference annotation. Here is the code for the class. I have tried removing activate, deactivate

Launching OSGI Felix on android gives error: “java.lang.UnsupportedOperationException: can't load this type of class file”

巧了我就是萌 提交于 2020-01-24 19:57:45
问题 I am trying to launch OSGI Felix framework on android. I followed this link and things were going fine. In the bundle directory, I added a bundle that was an eclipse plugin project that I created earlier in order to launch it on android. It has only one activator class with a "Hello" Message in the start() method. Now, when I launched Felix on android shell, I noticed that the bundle I added is causing a problem and can't be launched on android. Here's the errors I get when I launch Felix:

Trying to install new features in Eclipse (using ADT as the base package)

南笙酒味 提交于 2020-01-22 10:57:29
问题 When I try to install new features in Eclipse (using ADT as the base package) I get ‘Installing Software’ has encountered a problem. An error occurred while collecting items to be installed An error occurred while collecting items to be installed session context was:(profile=profile, hase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). No repository found containing: osgi.bundle,com.android.ide.eclipse.base,21.1.0.v201302060044-569685 No repository found containing:

How is Java 8 modules different from OSGi?

南笙酒味 提交于 2020-01-22 10:32:46
问题 Java 8 with Project Jigsaw brings a module system to the SDK. I see it as a good thing as it's part of the package (built-in). OSGi also provides a module system, but requires a container. But apart from that what are the major difference among them. If I use OSGi, will I able to run it using the standard JDK 8 release? Will OSGi relevant when the default SDK includes such capabilities? My understanding is that both OSGi and Jigsaw can be used to write normal modular Java applications and not

Consuming Services from Embedded OSGi Framework

梦想与她 提交于 2020-01-21 10:38:18
问题 I have embeddable Felix. I have some API bundle and Impl. API exports interface C .Impl imports that interface and register impl in activator. Now I want get C impl otside OSGi FrameworkFactory ff = new FrameworkFactory(); ... BundleContext bc = fwk.getBundleContext(); ... final ServiceReference[] serviceReferences = bc.getServiceReferences(C.class.getName(), "(objectclass=" + C.class.getName() + ")"); for(ServiceReference serviceReference : serviceReferences){ final Object service = bc