[英]Read from Weblogic , write to ActiveMQ
我有以下场景:
从Weblogic队列中读取消息,我必须将其写入ActiveMQ队列(事务明智)
(我不能使用JMS Bridge,外国JNDI因各种原因而不依赖我)
有办法做到这一点吗? 用Spring? 还是JCA?
谢谢
请参阅http://skaetech.webs.com/WeblogicToActiveMQ.pdf或http://skaetech.webs.com/weblogic.htm它包含如何在Weblogic-ActiveMQ-Weblogic之间建立Bridge的详细说明
Apache Camel在这里是一个不错的选择 - 它带有ActiveMQ,可以直接嵌入你的代理配置中(只是普通的Spring,用于启动代理的activemq.xml); 或者您可以在独立进程中独立于代理使用它。
要使用它,您需要为两个代理设置连接,并具有从Weblogic中的队列到ActiveMQ等效的路由。 这是一个快速而又脏的版本:
<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>
查看http://camel.apache.org/jms.html了解更多详情。 希望有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.