4 Replies Latest reply on Feb 6, 2011 11:02 AM by Florian Kunz

    JBoss 6: Problem with connecting to remote topic via JCA

    Florian Kunz Newbie

      Hi,

       

      I'm trying to get the following setup to work:

       

      - JBoss 6 Server hosts a JMS topic (lets call it Server01).

      - on this JBoss 6 Server an MDB is subscribed to the topic

      - another JBoss 6 Server subscribes to that topic via another MDB (this is Server02)

      - both Servers run on one machine (in my test setup)

      - i use port bindings ports-01 for Server01

      - and port bindings ports-02 for Server02

       

      The MDB on Server01 works fine. On Server02 I don't even get an error message but i also don't receive any JMS message.

       

      Here is my ra.xml for Server02:

              ...

             <config-property>

               <description>The transport type</description>

               <config-property-name>ConnectorClassName</config-property-name>

               <config-property-type>java.lang.String</config-property-type>

               <config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>

            </config-property>

            <config-property>

               <description>The transport configuration. These values must be in the form of key=val;key=val;</description>

               <config-property-name>ConnectionParameters</config-property-name>

               <config-property-type>java.lang.String</config-property-type>

               <config-property-value>host=127.0.0.1;port=5545</config-property-value>

            </config-property>

           ...

       

      This is the hornetq-configuration.xml on Server01:

           ...

            <connector name="netty">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

               <param key="host"  value="${jboss.bind.address:localhost}"/>

               <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

            </connector>

           ...

            <acceptor name="netty">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

               <param key="host"  value="${jboss.bind.address:localhost}"/>

               <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

            </acceptor>

             ...

       

      This is the hornetq-configuration.xml on Server02:

       

           ...

            <connector name="netty">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

               <param key="host"  value="${jboss.bind.address:localhost}"/>

               <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

            </connector>

           ...

           <acceptor name="netty">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

               <param key="host"  value="${jboss.bind.address:localhost}"/>

               <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>

            </acceptor>

           ...

       

      This is the MDB on Serve02:

       

      @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),

              @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/myTopic"),

              @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue ="Durable"),

              @ActivationConfigProperty(propertyName = "clientID", propertyValue = "myClient"),

              @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "mySubscription"),

              @ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),

              @ActivationConfigProperty(propertyName = "password", propertyValue = "guest")})

      @ResourceAdapter("hornetq-ra.rar")

      public class PLayerMessageConsumer implements MessageListener {

      ...

       

      Anyone got an idea? I don't seem to be the only one struggling with this or similar tasks.

       

      Thanks a lot in advance.