Hi,

Please find an example of a camel route using ActiveMQ and WebsphereMQ. I
have not used Glassfish and hence do not have an idea how instantiate a
connection factory for Glassfish's JMS implementation.

Obviously, you need to change the values for the connection factories
accordingly.

Cheers,

Ashwin...

====================================================

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans.xsd
            http://camel.apache.org/schema/spring
                http://camel.apache.org/schema/spring/camel-spring.xsd";>

    <camelContext xmlns="http://camel.apache.org/schema/spring";>
        <route>
            <from uri="activemq:queue:QueueA"/>
            <to uri="wmq:queue:QueueB"/>
        </route>
    </camelContext>

    <bean id="activemq"
class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="userName" value="foo" />
                <property name="password" value="bar" />
                <property name="brokerURL" value="vm://${brokerName}" />
                <property name="copyMessageOnSend" value="false"/>
                <property name="useAsyncSend" value="true"/>
        </bean>
        
        <bean id="wmq" class="org.apache.camel.component.jms.JmsComponent">
          <property name="connectionFactory">
            <bean class="com.ibm.mq.jms.MQConnectionFactory">
                        <property name="transportType" value="1"/>
                    <property name="hostName" value="machine"/> 
                    <property name="port" value="1414"/> 
                    <property name="queueManager" value="QM_TEST"/> 
            </bean>
          </property>
        </bean>


</beans>

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
--
View this message in context: 
http://camel.465427.n5.nabble.com/Programatically-using-Camel-with-different-jms-providers-tp5029408p5029886.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to