qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbie Gemmell <robbie.gemm...@gmail.com>
Subject Re: Qpid non jndi
Date Fri, 06 Apr 2012 16:34:10 GMT
Hi Eugene,

There have certainly been users on the list over the years using the
client in osgi environments which suggests it is possible to make that
work. I dont really have any experience there to help on that front,
however I can answer the question you have asked...

The JNDI context utlimately ends up instantiating an
AMQConnectionFactory instance using the connection URL string you
provide, and whilst we wouldnt really recommend it there is nothing
stopping you doing the same. Just be aware that this obviously breaks
the portability of your JMS code, and as this isn't the intended usage
pattern for the class and the implementation is subject to change in
future you might need update your usage accordingly if there are any.

Robbie

On 6 April 2012 11:43, eugene <eugen.rabii@gmail.com> wrote:
> Hey, simple question here.
>
> We have used jndi with jms to get connections to the qpid server (mrg).
> While it works fine, when deploying this into osgi container, the problem
> starts. JNDI needs a correctly set context class loader, otherwise
> ClassNotFoundExceptions will be thrown.
>
> Suppose you have a bundle A that exports :
> org.apache.qpid.jndi.PropertiesFileInitialContextFactory
>
> If another bundle B imports this - it will not work, throwing a
> ClassNotFoundException - something really nasty around class loader and
> osgi.
>
> We have used Eclipse Virgo as the underlying osgi container  and it has the
> <Import-Bundle> tag that saved us, so far. Now we need to switch to Apache
> Karaf - and bum! ClassNotFoundException everywhere.
>
> Thus my question is there any other way to obtain connections in qpid jms
> then jndi?
>
> Thank You,
> Eugene.
>
> --
> View this message in context: http://apache-qpid-developers.2158895.n2.nabble.com/Qpid-non-jndi-tp7442675p7442675.html
> Sent from the Apache Qpid developers mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>

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


Mime
View raw message