You can configure your JMS provider in Spring XML as follows:
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <jmxAgent id="agent" disabled="true"/> </camelContext> <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="connectionFactory"> <bean class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value= "vm://localhost?broker.persistent=false&broker.useJmx=false"/> </bean> </property> </bean>
Basically, you can configure as many JMS component instances as you wish and give them
a unique name using the
id attribute .
The preceding example configures an
activemq component. You could do the same
to configure MQSeries, TibCo, BEA, Sonic and so on.
Once you have a named JMS component, you can then refer to endpoints within that
component using URIs. For example for the component name,
activemq, you can
then refer to destinations using the URI format,
activemq:[queue:|topic:]destinationName. You can use the same approach for
all other JMS providers.