Hi Matthieu,
A new broker is being created because you have an <activemq:broker> defined
in your blueprint context.
You should remove this element if you do not want a new broker to be
created by the blueprint container.
Next, you will ned to include a jmsConnectionFactory in the activemq bean,
which indicates the specific connection factory you are using.
Here is an example that I created recently, which also happend to use a
transaction manager ::
...
<bean id="transactionManager"
class=
"org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="jmsConnectionFactory"/>
</bean>
<bean id="jmsConnectionFactory" class=
"org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value=
"tcp://localhost:61616?jms.redeliveryPolicy.maximumRedeliveries=3&jms.redeliveryPolicy.initialRedeliveryDelay=500)"
/>
</bean>
<bean name="activemq" class=
"org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="jmsConnectionFactory"/>
<property name="transactionManager" ref="transactionManager"/>
<property name="transacted" value="true"/>
</bean>
On Tue, Dec 18, 2012 at 9:04 AM, Matthieu Vincent <[email protected]>wrote:
> Hi,
>
> I'd like to send JMS message from my servicemix platform through an
> external (standalone) activemq broker. I've tried many configuration but
> each time I deploy my bundle, it starts an internal broker in servicemix.
>
> Does anyone already succeeded to configure such process ?
>
> Here is my latest configuration :
>
> <?xml version="1.0" encoding="UTF-8"?><blueprint
> xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cm="
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
> xmlns:camel="http://camel.apache.org/schema/blueprint"
> xmlns:activemq="http://activemq.apache.org/schema/core"
> xsi:schemaLocation="
> http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0
> http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
> http://camel.apache.org/schema/blueprint
> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd
> ">
>
> <!-- Camel context where routes are defined programmatically in
> classes in defined package -->
> <camelContext trace="true" id="blueprintContext"
> xmlns="http://camel.apache.org/schema/blueprint">
> <camel:route>
> <camel:from uri="file://inbox?delete=true" />
> <camel:to uri="activemq:queue:esb-to-ext">
> </camel:route>
> </camelContext>
>
> <activemq:broker>
> <activemq:managementContext>
> <activemq:managementContext createConnector="false" />
> </activemq:managementContext>
> <activemq:transportConnectors>
> <activemq:transportConnector uri="tcp://0.0.0.0:16161" />
> </activemq:transportConnectors> -->
> </activemq:broker>
>
> <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
> <property name="brokerURL" value="tcp://0.0.0.0:16161" />
> </bean></blueprint>
>