5 Replies Latest reply on Jul 9, 2010 10:23 AM by Min Huang

    MDB on a jboss EAP 5.0 conencting to remote standalone hornetq 2.1

    Min Huang Newbie

      I deployed a  MDB on a jboss EAP 5.0. It is a consumer to a queue on a remote standalone hornetq 2.1. The connection is in a wait loop until it is timed out in 10 minutes. No error found on server.log. No activity seen on hornetq log either.

       

      Although the connection factory status is up, the test Connection operation also timed out in 10 minutes.

       

      hornetq is on hornetq_server, MDB is on mdb_server.

        • 1. Re: MDB on a jboss EAP 5.0 conencting to remote standalone hornetq 2.1
          Andy Taylor Master

          This is most probably a config issue. Try running the jca examples in the  distro.

          • 2. Re: MDB on a jboss EAP 5.0 conencting to remote standalone hornetq 2.1
            Min Huang Newbie

            I had troubling formatting the text here.

             

            1. hornetq_jms_ds.xml on mbd_server/deploy:

            <tx-connection-factory>   

            <jndi-name>HornetQXA</jndi-name>   

            <xa-transaction/>   

            <rar-name>hornetq-ra.rar</rar-name>   

            <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>   

            <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property>   

            <config-property name="ConnectorClassName" type="java.lang.String">org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property>   

            <config-property name="ConnectionParameters" type="java.lang.String">host=hornetq_server;port=5445</config-property>   

            <config-property name="UserName" type="java.lang.String">user</config-property>   

            <config-property name="Password" type="java.lang.String">password</config-property>    

            <max-pool-size>20</max-pool-size>      <security-domain-and-application>HornetQXARealm</security-domain-and-application>

            </tx-connection-factory>

             

            2.  ra.xml updated in hornetq-rar.rar: <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=hornetq_server;port=5445</config-property-value>     

            </config-property>    

            <config-property>            

            <description>The user name used to login to the JMS server</description>            

            <config-property-name>UserName</config-property-name>            

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

            <config-property-value>user</config-property-value>   

            </config-property>    

            <config-property>            

            <description>The password used to login to the JMS server</description>            

            <config-property-name>Password</config-property-name>            

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

            <config-property-value>password</config-property-value>    

            </config-property>

             

            The jca-config examples have jboss and hornetq on one machine, which is not the case here. I can't runt he example from hornetq_server, since the jboss installation is on mdb_server. Can you see any config here is different from the example? Thanks

            • 3. Re: MDB on a jboss EAP 5.0 conencting to remote standalone hornetq 2.1
              Clebert Suconic Master
              I had troubling formatting the text here.

               

              You can always attach files to messages on the forum. Look at "Choose File" when you're posting a message

              • 4. Re: MDB on a jboss EAP 5.0 conencting to remote standalone hornetq 2.1
                Min Huang Newbie

                The netty setting on hornetq_server is consistent with ra.xml and hornetq-jms-ds.xml:

                 

                hornetq-configuration.xml on hornetq_server:                       

                 

                <connectors>     

                <connector name="netty">        

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

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

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

                </connector>           

                <connector name="netty-throughput">        

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

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

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

                <param key="batch-delay" value="50"/>     

                </connector>  

                </connectors>  

                <acceptors>     

                <acceptor name="netty">        

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

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

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

                </acceptor>           

                <acceptor name="netty-throughput">        

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

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

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

                <param key="batch-delay" value="50"/>        

                <param key="direct-deliver" value="false"/>     

                </acceptor>  

                </acceptors>

                • 5. Re: MDB on a jboss EAP 5.0 conencting to remote standalone hornetq 2.1
                  Min Huang Newbie

                  Actually, the port number is not 5445, but the system property hornetq.remoting.netty.port. I also switched to use physical destination name on ejb-jar.xml. It worked! MDB consumed the messages on the queue. Thanks for all the replies.