0 Replies Latest reply on Nov 17, 2016 2:29 PM by Colin Negrow

    Can JBoss EAP7 consume Weblogic 12 JMS queues?

    Colin Negrow Newbie

      Hi,

      This question is about two things:

      1) Is it possible to have listeners consuming Weblogic 12 queue? The weblogic server is in the same network as JBoss EAP7 server

       

      2) Would distributed transactions work in such envrionment? For example when there is some error while consuming the queue, the message shoul return to weblogic, to some error queue. All operations should be made in distributed transaction as it would be two Weblogic servers where one has queue exposed and the second one has consumer.

       

      3) How and if connection factory should be defined in standalone.xml file?

       

      I use Spring to define queue consumers, as you see I have WLInitialContextFactory in jndiTemplate properties. This worked in Weblogic-Weblogic enviroment. Today I want to change one of the serversto JBoss EAP, this would be the server that consumes Weblogic queues.

       

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"

      "http://www.springframework.org/dtd/spring-beans.dtd">

      <beans>

       

      <bean id="invoiceListener" class="jms.InvoiceMDB" />

       

      <bean id="jndiTemplate" 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://someServer:7001</prop>

      </props>

      </property>

      </bean>

       

      <bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">

      <property name="jndiTemplate">

      <ref bean="jndiTemplate" />

      </property>

      <property name="jndiName">

      <value>jms/connectionFactory</value>

      </property>

      </bean>

       

      <bean id="jmsDestinationResolver" class="org.springframework.jms.support.destination.JndiDestinationResolver">

      <property name="jndiTemplate">

      <ref bean="jndiTemplate" />

      </property>

      <property name="cache">

      <value>true</value>

      </property>

      </bean>

       

      <bean id="invoiceQueueTemplate" class="org.springframework.jms.core.JmsTemplate">

      <property name="connectionFactory">

      <ref bean="queueConnectionFactory" />

      </property>

      <property name="destinationResolver">

      <ref bean="jmsDestinationResolver" />

      </property>

      </bean>

       

      <bean id="jmsInvoiceSender" class="jms.InvoiceQueueSender">

      <property name="jmsTemplate">

      <ref bean="invoiceQueueTemplate" />

      </property>

       

      </bean>

       

      <bean id="invoiceQueue" class="org.springframework.jndi.JndiObjectFactoryBean">

      <property name="jndiTemplate">

         <ref bean="jndiTemplate" />

      </property>

      <property name="jndiName">

         <value>jms/testQueue</value>

      </property>

      </bean>

      <bean id="Invoicelistener" class="org.springframework.jms.listener.DefaultMessageListenerContainer">

          <property name="concurrentConsumers" value="5" />

          <property name="connectionFactory" ref="queueConnectionFactory" />

          <property name="destination" ref="invoiceQueue" />

          <property name="messageListener" ref="invoiceListener" />

        </bean>

      </beans>