[ 
https://issues.apache.org/jira/browse/QPID-6352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rob Godfrey closed QPID-6352.
-----------------------------
    Resolution: Fixed

> ServiceLoader causes problems in OSGI
> -------------------------------------
>
>                 Key: QPID-6352
>                 URL: https://issues.apache.org/jira/browse/QPID-6352
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JMS AMQP 1.0 Client
>    Affects Versions: 0.30
>         Environment: karaf 2.4.1
>            Reporter: Gary Tully
>              Labels: karaf, osgi
>
> The client currently does not run in karaf. There is some support for 
> serviceLoader in later versions of osgi, but I don't know of any container 
> that supports that at the moment.
> 0.26 did not use a service loader in this way so the activemq test worked 
> with that version.
> The simplest workaround is to use a fragment to relate the two jars together 
> so that the service loader will work.
> This can be seen at: 
> https://github.com/apache/activemq/blob/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQAMQPBrokerFeatureTest.java#L38
> where the qpid-amqp-1-0-client binds (share the bundle classloader of) 
> qpid-amqp-1-0-client-jms
> Maybe just document that and let the wrap deployer in karaf do the work of 
> adding osgi manifest entries on the fly as that test does. That is the 
> simplest answer but may be karaf specific.
> Or add in osgi header info to make the fragment association explicit
> or bundle the two jars together with some osgi metadata.
> The latter two will require some osgi testing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to