tree: 3b97269eba02f1ee6b3d7f2dc8bdb252275658f2 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
activemq/activemq-service/README.md

ActiveMQ Service

This bundle provides default connection factories which let you connect with the ActiveMQ broker deployed in ServiceMix.This connection factories are used at least by the activemq Camel component registered by the org.apache.servicemix.activemq.camel bundle.

You can get the reference for the connection factory using following blueprint snippet

<reference id="pooledConnectionFactory" interface="javax.jms.ConnectionFactory"
           filter="(&amp;(transacted=false)(name=default-cf))"/>

In case you need the transacted connection factory you should use following snippet

<reference id="pooledConnectionFactory" interface="javax.jms.ConnectionFactory"
           filter="(&amp;(transacted=true)(name=default-cf-xa))"/>

Configuring the broker

The connection factories are associated the default broker installed by the activemq-broker bundle - amq-broker.

Assume, there are more brokers deployed in ServiceMix or you have changed the name of the default broker.

karaf@root> activemq:list
brokerName = amq-broker

brokerName = local-broker

If you want to change the broker associated with the connection factories (or you have changed the name of the default broker) you should change the broker-name property using Config Admin

karaf@root>config:edit org.apache.servicemix.activemq.service
karaf@root>property-set broker-name local-broker
karaf@root>config:update