osgi

Using an external java library in OSGI bundle

余生颓废 提交于 2019-12-12 02:27:08
问题 I want to use this java library [1]enj-library in my OSGI bundle that will be executed under KURA eclipse platform. I compiled the library as jar and then I created a new plugin project under eclipse "Plug-in from existing JAR archive" then I tried to add it to my bundle, but it did not work: 1.I tried to import the bundle and I verified that the version is correct in both manifest files in the import and the export, but I gopt this error: org.osgi.framework.BundleException: The bundle "org

JSP Spring internationalization using OSGi as service changing locale not working properly

三世轮回 提交于 2019-12-12 02:09:29
问题 First of all! Don't judge me the reason that I'm using MessageSource as a service. Since I'm in a phase learning OSGi and Spring. I have a project that has many modules, in their pages, since I'm making internationalization for it. I saw that they use the same messages, so I put the codes in a common module that every module uses it. And I shared the message as a service osgi-context.xml: <osgi:service ref="messageSource" interface="org.springframework.context.support

OSGi using jpa persistence unit from another bundle?

女生的网名这么多〃 提交于 2019-12-12 02:08:18
问题 I use ServiceMix with Apache Felix and my Enterprise Application consist of several bundles. For example I have a bundle with my jpa entity classes and another bundle with business logic and dao-classes. Because of I use OpenJPA the entity-bundle project needs the persistenc.xml in META-INF folder for bytecode injection at compiletime, but this bundle provides the persistence unit by the Meta-Persistence header in the bundle manifest. Inside of the dao providing bundle I inject the entity

PAX-CDI: how to get reference to BeanManager in bundle without using CDI

谁都会走 提交于 2019-12-12 01:57:32
问题 There is a bundle A and threre is a class MyClass in bundle A. And we suppose that pax-cdi+weld is on. Can can I get reference to BeanManager of the bundle A inside MyClass without using @Inject and other CDI annotations? Via osgi service? Or how? 回答1: You can look up the CdiContainer OSGi service and invoke getBeanManager() . With recent versions of Pax CDI CDI.current().getBeanManager() should work as well. Having said that, the whole idea of Pax CDI is to make CDI work in OSGi just like in

Changes made to JVM profile in CICS are not being reflected in the runtime

久未见 提交于 2019-12-12 01:54:48
问题 I made a change to an OSGi JVM Profile by adding a library to LIBPATH_SUFFIX . After that I discarded my JVM server and reinstalled it, but the changes are not getting reflected. Is there a secondary step that I should have taken care of after making the changes to the JVM Profile file? 回答1: If you want to add DB2 JDBC type2 driver support to an OSGi JVM server you will need to do the following: Add the DB2 libraries to the CICS STEPLIB Create/install a CICS DB2CONN resource and ensure this

Domino OSGI dev and Testing - What about a designer connection?

会有一股神秘感。 提交于 2019-12-12 01:38:13
问题 This is a continuation of a question that I asked last week. With the answers I received, I was able to set up an environment where I could, at least theoretically start working to copy my classes into a plug-in project from designer. Currently, I have imported the ExtLibs source as projects (other than a few test projects which hopefully do not matter) without any errors, the openNTF Domino API, and a plug-in project for my utility files. I configured my debug options, and have tried to get

How can I get properties stored in ConfigAdmin?

穿精又带淫゛_ 提交于 2019-12-12 01:38:04
问题 I've created the ConfigAdmin loaded some properties. After that I've saved them. My question is: how can I get the properties that I have stored? I've created the ConfigAdmin in the Activator.java: public class Activator implements BundleActivator { private String configFile = "API.properties"; @Override public void start(BundleContext bundleContext) throws Exception { InputStream stream = (bundleContext.getBundle().getResource(configFile)).openStream(); Properties properties = new Properties

Apache felix and org.osgi for weld cdi - constraint violation

♀尐吖头ヾ 提交于 2019-12-12 01:25:08
问题 I want to do the following solution:Apache Felix + Weld for Java SE. For that I want to run one of examples from weld archive - weld-osgi-paint. For now I have the following bunle list: cdi-api.jar ops4j-base-lang-1.5.0.jar pax-swissbox-core-1.8.0.jar weld-osgi-paint-core.jar org.apache.felix.scr-1.8.2.jar pax-swissbox-lifecycle-1.8.0.jar weld-osgi-paint-square.jar javax.annotation-api-1.2.jar org.apache.servicemix.bundles.javax-inject-1_2.jar pax-swissbox-tracker-1.8.0.jar weld-osgi-paint

How can i add Declarative Services support to embedded felix in Netbeans?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 00:44:33
问题 In netbeans, embedded felix does not support DS.How can we add Felix Service Component Runtime to embedded felix in netbeans. 回答1: Declarative Services is implemented by an ordinary bundle, called SCR (Service Component Runtime). Simply install that bundle! Look for SCR on the Felix downloads page: http://felix.apache.org/downloads.cgi 来源: https://stackoverflow.com/questions/19152649/how-can-i-add-declarative-services-support-to-embedded-felix-in-netbeans

Loading same plugin twice with different version in Eclipse

孤街浪徒 提交于 2019-12-11 23:58:44
问题 I have two different versions of an EMF plugin which loads a certain .xmi. The latter version has been changed so that the xmi from the previous version is incompatible. What I want to do is to load the xmi's with the first plugin and then programatically build a model using the newer plugin thus migrating older models. They are identical apart from some changes within an EMF model. How do I load these plugins? Is it possible? Are there better strategies? 回答1: I suggest changing the id of the