简体   繁体   中英

Read from Weblogic , write to ActiveMQ

I have the following scenario:

Read a message from a Weblogic queue and I have to write this to an ActiveMQ queue (transaction wise)

(i can't use JMS Bridge,Foreign JNDI for various reason that do not depend on me)

Is there a way of doing this ? using Spring ? or JCA ?

Thanks

请参阅http://skaetech.webs.com/WeblogicToActiveMQ.pdfhttp://skaetech.webs.com/weblogic.htm它包含如何在Weblogic-ActiveMQ-Weblogic之间建立Bridge的详细说明

Apache Camel is a good option here - it comes with ActiveMQ and can be embedded directly inside your broker config (just normal Spring, in activemq.xml used to start the broker); or you can use it independently of the broker in a standalone process.

To use it, you'd set up the connections for the two brokers, and have a route from a queue in Weblogic to an ActiveMQ equivalent. Here's a quick and dirty version:

<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"/>
        </bean>
    </property>
</bean>

<bean id="weblogic" class="org.apache.camel.component.jms.JmsComponent">
    <!-- depends on a factory defined elsewhere -->
    <property name="connectionFactory" ref="myWeblogicConnectionFactory"/>
</bean>

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="weblogic:myInputQueue"/>
        <to uri="activemq:myOutputQueue"/>
    </route>
</camelContext>

Check out http://camel.apache.org/jms.html for more details. Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM