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.
|