简体   繁体   English

如何从JBOSS保险丝向Weblogic JMS发送JMS消息

[英]How to send a JMS message from JBOSS Fuse to Weblogic JMS

I am trying to send a message from Active-MQ to Weblogic. 我正在尝试从Active-MQ向Weblogic发送消息。 I have created JMS bridge like below: 我创建了如下的JMS桥:

<jmsBridgeConnectors>     
 <jmsQueueConnector name="JreportRequestBridge-Inbound" jndiOutboundTemplate="#remoteJndi"outboundQueueConnectionFactoryName="jms/ConnectionFactory"
    localQueueConnectionFactory="#activemqConnectionFactory">        
            <inboundQueueBridges>          
                <inboundQueueBridge inboundQueueName="RequestQueue"/></inboundQueueBridges>      
            </jmsQueueConnector>    
        </jmsBridgeConnectors>
<bean id="remoteJndi" class="org.springframework.jndi.JndiTemplate">        
        <property name="environment">                
            <props>                        
                <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                <prop key="java.naming.provider.url">t3://host:port</prop>                
            </props>
        </property>
    </bean>

Now when I am trying to create the Brokerservice using the destination url I am getting exception as below: 现在,当我尝试使用目标网址创建Brokerservice时,出现如下异常:

java.io.IOException: Transport scheme NOT recognized: [t3]
    at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:25)
    at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:171)
    at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.java:108)
    at org.apache.activemq.broker.BrokerService.createTransportConnector(BrokerService.java:1348)
    at org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:163)
    at org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:153)
    at test.oas.Server.<init>(Server.java:32)
    at test.oas.Server.main(Server.java:99)
Caused by: java.io.IOException: Could not find factory class for resource: META-INF/services/org/apache/activemq/transport/t3
    at org.apache.activemq.util.FactoryFinder.doFindFactoryProperies(FactoryFinder.java:90)
    at org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:58)
    at org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:47)
    at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:167)
    ... 6 more

Code to create the BrokerService: 创建BrokerService的代码:

try {            
            //This message broker is embedded            
            BrokerService broker = new BrokerService();            
            broker.setPersistent(false);            
            broker.setUseJmx(false);            
            broker.addConnector(messageBrokerUrl);            
            broker.start();       
            } catch (Exception e) {

                e.printStackTrace();      
                }     

Can someone please help me. 有人可以帮帮我吗。

This is an old question, but as Alan mentioned in the comment, this is because ActiveMQ needs the "jms" driver to be able to talk to Weblogic. 这是一个古老的问题,但是正如Alan在评论中提到的那样,这是因为ActiveMQ需要“ jms”驱动程序才能与Weblogic进行对话。

In weblogic 11g (10.3.6), you need to take the library wlthint3client.jar and put it in the lib folder inside ActiveMQ. 在weblogic 11g(10.3.6)中,您需要使用库wlthint3client.jar并将其放在ActiveMQ的lib文件夹中。 This is the weblogic t3 thin client , which allows to connect to it using the t3 protocol. 这是weblogic t3瘦客户端 ,它允许使用t3协议与其连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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