karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kit Plummer <kitplum...@gmail.com>
Subject Re: Pax Exam...ActiveMQ.
Date Thu, 16 Dec 2010 16:34:20 GMT

Well, I've been able to get it working, with a remotely running broker. 
Though I think it would be entirely possible to embed the starting up of the
broker from within my exam.

The trick was getting my bundle which depends on an incoming
javax.jms.ConnectionFactory.  From inside my exam I just created an
ActiveMQConnectionFactory, and registered the ConnectionFactory as a
service:

bundleContext.registerService(javax.jms.ConnectionFactory.class.getName(), 
   connectionFactory, 
   new Hashtable());

Pretty simple.  The HashTable can be loaded with params to point to a
non-default broker config I think.

Kit
-- 
View this message in context: http://karaf.922171.n3.nabble.com/Pax-Exam-ActiveMQ-tp2092209p2099308.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Mime
View raw message