osgi

Migration solution for singletons in an OSGI environment

半城伤御伤魂 提交于 2019-12-13 16:20:53
问题 I'm working in a Java EE Environment in which each application is in a war file of its own. In the WEB-INF/lib of each application war file there is a common jar that is shared by all applications. This common jar contains several Singletons which are accessed from many points in the code. Because of the war-file boundaries each application has its own instances of the Singletons. Which is how we operate today, since we want to configure some of the singletons differently in each application.

Servicemix 4, DOSGi, and Zookeeper

萝らか妹 提交于 2019-12-13 12:14:52
问题 This is cross posted from the fusesource forum and the servicemmix forum. I can't get DOSGi working in FUSE. I'm trying to get CXF's DOSGi 1.1-SNAPSHOT with Zookeeper discovery onto FUSE 4.1.0.2. I'm also using Zookeepr 3.2.1. Everything works perfectly on Felix 2.0.0. I just follow the instructions on the DOSGi Discovery page and then install the Discovery Demo bundles. For DOSGi, I just use the cxf-dosgi-ri-singlebundle-distribution-1.1-SNAPSHOT.jar for DSW and cxf-dosgi-ri-discovery

multiple slf4j bindings in Eclipse RCP Plugin

拈花ヽ惹草 提交于 2019-12-13 12:03:43
问题 I have a simple Eclipse Plugin which gives me following error on activation: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [bundleresource://103.fwk8918249:1/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [bundleresource://103.fwk8918249:4/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. both URLs resolve to the exact same jar in the bundle libs/slf4j-log4j12.jar!/org/slf4j

Looking up OSGi services from outside the OSGi container

会有一股神秘感。 提交于 2019-12-13 10:24:30
问题 I have a set of bundles deployed in Karaf and exposing a number of OSGi services which I would like to be able to lookup and call remotely, from an application running on a (possibly) different machine and in a non-OSGi container. My initial though was to use JNDI lookup to get the services I want however I understand from an earlier stackoverflow post that this might not be supported (I say might since I haven't been able to find any information on whether anything has changed on the Aries

My html hyperlinks do not work in my OSGI bundle

与世无争的帅哥 提交于 2019-12-13 07:46:13
问题 I am using Java and HelpGUI in my OSGI bundle and the links that use do not work. When I use HelpGUI in a non-OSGI Java project, they work just fine on the same html files. Is there some security setting or something special with paths that I need to consider? Let me know, I am horribly stuck. 回答1: You should have a look at the source code of HelpGui, I can see why it doesn't quite work in OSGi (it relies on a specific URL format resources in jar files usually have). If you look at the net

OSGi: javax.annotation conflict: Java SE vs Java EE

微笑、不失礼 提交于 2019-12-13 07:35:47
问题 In a Java SE OSGi (Apache Felix) environment, I'm trying to integrate CDI using PAX CDI and Weld 2.2.6.Final. I'm currently getting the following error: ERROR: Bundle org.jboss.weld.osgi-bundle [45] Error starting file:///someDir/org/jboss/weld/weld-osgi-bundle/2.2.6.Final/weld-osgi-bundle-2.2.6.Final.jar (org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision org.jboss.weld.osgi-bundle [45.0] because it is exposed to package 'javax.annotation' from

Try to generate a p2 site with mixed osgi and non osgi bundle

霸气de小男生 提交于 2019-12-13 07:24:03
问题 I try many thing to create a p2 repository with all transitive (OSGI and non OSGI) maven dependencies of my project, but tycho take only account of osgi.bundle ? The maven-dependency-plugin copy all the maven files, and tycho-p2-extras-plugin generate the metadata for p2 site. tycho-p2-repository-plugin generate the p2 repository using the /target/source/plugins dependencies previously downloaded. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema

Install odl-restconf in custom karaf distribution

蹲街弑〆低调 提交于 2019-12-13 07:18:56
问题 I have a custom karaf installation. I want to do a feature:install odl-restconf. for doing this i have done a feature:repo-add of feature file available in the below location https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/controller/features-restconf/1.3.0-SNAPSHOT/ After this i have made entries in karaf org.ops4j.pax.url.mvn.cfg file and added the below url as part of maven repo http://nexus.opendaylight.org/content/repositories@id=public, \ http:

How to consume OSGi service from OSGi HTTP Service

送分小仙女□ 提交于 2019-12-13 06:24:49
问题 I have a bundle A which exposes the following service: In OSGI-INF/config.xml <?xml version="1.0" encoding="UTF-8"?> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="com.example.MyService" modified="updated" immediate="true"> <implementation class="com.example.impl.MyServiceImpl"/> <service> <provide interface="com.example.MyService"/> </service> </scr:component> Next step, I want to consume this service from a servlet in bundle B. What I do is the following: protected

ServiceMix / Blueprint / JPA Integration

江枫思渺然 提交于 2019-12-13 05:51:51
问题 I have been spending the week attempting to integrate JPA / ServiceMix 4.5.1 / camel-jpa 2.10.4 / Blueprint together. I'm currently using OpenJPA, but am not tied to it. The version of aries jpa used by servicemix is 0.3.0. The stack trace I cannot get past is: org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instanciating bean workoutEntity of class class [...].WorkoutEntity at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:271)[10