1 Reply Latest reply on Nov 3, 2015 9:12 PM by Syed Mahdi

    Glassfish hornetq rar connecting to Wildfly HornetQ

    Syed Mahdi Apprentice

      Hello All,

       

      I have an old application on glassFish which works fine and has a hornetq rar connector that connects to a remote HornetQ also on jboss5.0.1 (Glassfish is on host test2 and jboss/Wildfly are on test1)

      On host test1 i have jboss 5.0.1 and has a hornetq configured and the connection is ok. Now we need to upgrade jboss to Wildfly9 on host test1

      Some how it is not connecting. The hornetQ on Wildfly is not visible to glassfish.


      In the domain.xml in the application on glassfish it reads:

       

      <resource-adapter-config resource-adapter-name="hornetq-ra">
            <property name="ConnectionParameters" value="host=test1;port=5445"></property>
            <property name="ConnectorClassName" value="org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"></property>
          </resource-adapter-config>
          <connector-connection-pool name="myAppConnectionPool" resource-adapter-name="hornetq-ra" connection-definition-name="org.hornetq.ra.HornetQRAConnectionFactory" transaction-support="XATransaction">
            <property name="UseTryLock" value="0"></property>
            <property name="Password" value="guest"></property>
            <property name="TransactionBatchSize" value="0"></property>
            <property name="UserName" value="guest"></property>
            <property name="ReconnectAttempts" value="1"></property>
            <property name="SessionDefaultType" value="javax.jms.Queue"></property>
          </connector-connection-pool>
          <connector-resource pool-name="myAppConnectionPool" jndi-name="jms/myAppConnectionFactory"></connector-resource>
      
      

       

       

      From this I understand that I need a netty acceptor on my test1 end in wildfly

       

      so my standalone-full.xml reads like this

       

      <subsystem xmlns="urn:jboss:domain:messaging:3.0">
                  <hornetq-server>
                      <security-enabled>false</security-enabled>
                      <jmx-management-enabled>true</jmx-management-enabled>
                      <journal-file-size>102400</journal-file-size>
      
      
                      <connectors>
                          <http-connector name="http-connector" socket-binding="http">
                              <param key="http-upgrade-endpoint" value="http-acceptor"/>
                          </http-connector>
                          <http-connector name="http-connector-throughput" socket-binding="http">
                              <param key="http-upgrade-endpoint" value="http-acceptor-throughput"/>
                              <param key="batch-delay" value="50"/>
                          </http-connector>
                          <netty-connector name="netty" socket-binding="messaging"/>
                          <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
                              <param key="batch-delay" value="50"/>
                          </netty-connector>
                          <in-vm-connector name="in-vm" server-id="0"/>
                      </connectors>
      
      
                      <acceptors>
                          <http-acceptor http-listener="default" name="http-acceptor"/>
                          <http-acceptor http-listener="default" name="http-acceptor-throughput">
                              <param key="batch-delay" value="50"/>
                              <param key="direct-deliver" value="false"/>
                          </http-acceptor>
                          <netty-acceptor name="netty" socket-binding="messaging"/>
                          <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
                              <param key="batch-delay" value="50"/>
                              <param key="direct-deliver" value="false"/>
                          </netty-acceptor>
                          <in-vm-acceptor name="in-vm" server-id="0"/>
                      </acceptors>
      
      
                      <security-settings>
                          <security-setting match="#">
                              <permission type="send" roles="guest"/>
                              <permission type="consume" roles="guest"/>
                              <permission type="createNonDurableQueue" roles="guest"/>
                              <permission type="deleteNonDurableQueue" roles="guest"/>
                          </security-setting>
                      </security-settings>
      
      
                      <address-settings>
                          <address-setting match="#">
                              <dead-letter-address>jms.queue.DLQ</dead-letter-address>
                              <expiry-address>jms.queue.ExpiryQueue</expiry-address>
                              <max-size-bytes>10485760</max-size-bytes>
                              <page-size-bytes>2097152</page-size-bytes>
                              <message-counter-history-day-limit>10</message-counter-history-day-limit>
                          </address-setting>
                      </address-settings>
      
      
                      <jms-connection-factories>
                          <connection-factory name="InVmConnectionFactory">
                              <connectors>
                                  <connector-ref connector-name="in-vm"/>
                              </connectors>
                              <entries>
                                  <entry name="java:/ConnectionFactory"/>
                              </entries>
                          </connection-factory>
                          <connection-factory name="RemoteConnectionFactory">
                              <connectors>
                                  <connector-ref connector-name="http-connector"/>
                              </connectors>
                              <entries>
                                  <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
                              </entries>
                          </connection-factory>
                          <pooled-connection-factory name="hornetq-ra">
                              <transaction mode="xa"/>
                              <connectors>
                                  <connector-ref connector-name="in-vm"/>
                              </connectors>
                              <entries>
                                  <entry name="java:/JmsXA"/>
                                  <entry name="java:jboss/DefaultJMSConnectionFactory"/>
                              </entries>
                          </pooled-connection-factory>
                      </jms-connection-factories>
      
      
                      <jms-destinations>
                          <jms-queue name="ExpiryQueue">
                              <entry name="java:/jms/queue/ExpiryQueue"/>
                          </jms-queue>
                          <jms-queue name="DLQ">
                              <entry name="java:/jms/queue/DLQ"/>
                          </jms-queue>
                          <jms-queue name="myApp.myQueue">
                              <entry name="/queue/myQueue"/>
                          </jms-queue>
                      </jms-destinations>
                  </hornetq-server>
      
      

       

      my socket binding is :

              <socket-binding name="messaging" port="5445"/>
              <socket-binding name="messaging-backup" port="5545"/>
              <socket-binding name="messaging-throughput" port="5455"/>
      
      

      Even after having the Acceptor I was thinking the connection should be working and the glassfish connector should connect to the hornetq on wildfly on test1.

      Is there a step I am missing.

       

      Thanks in advance