Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-961

ActiveMQ rar is not implementing isValid method causing abrupt connection termination by arjuna tx

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JBoss A-MQ 6.2.1
    • JBoss A-MQ 6.1
    • rar-jee
    • None
    • Hide

      Step-1) Deploy the "activemq-rar-5.9.0.redhat-610379.rar" on JBoss EAP 6.3.3 side. (I deployed it with a different name "activemq-ra.rar" so further configuratiuons will be accordingly)

      Step-2) Edit the resource-adapter subsystem of JBoss EAP standalone.xml file by adding the following entry in it:

              <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">
                  <resource-adapters>
                      <resource-adapter id="activemq-ra.rar">
                          <archive>
                              activemq-ra.rar
                          </archive>
                          <transaction-support>XATransaction</transaction-support>
                          <config-property name="InitialRedeliveryDelay">
                              5000
                          </config-property>
                          <config-property name="MaximumRedeliveries">
                              4
                          </config-property>
                          <config-property name="Password">
                              admin
                          </config-property>
                          <config-property name="UserName">
                              admin
                          </config-property>
                          <config-property name="ServerUrl">
                              tcp://localhost:61616
                          </config-property>
                          <connection-definitions>
                              <connection-definition class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name="java:jboss/exported/activemq/ActiveMQQueueConnectionFactory" enabled="true" use-java-context="false" pool-name="java:/jms/ActiveMQPool" use-ccm="false">
                                  <xa-pool>
                                      <min-pool-size>10</min-pool-size>
                                      <max-pool-size>15</max-pool-size>
                                  </xa-pool>
                                  <recovery>
                                      <recover-credential>
                                          <user-name>admin</user-name>
                                          <password>admin</password>
                                      </recover-credential>
                                  </recovery>
                              </connection-definition>
                          </connection-definitions>
                          <admin-objects>
                              <admin-object class-name="org.apache.activemq.command.ActiveMQQueue" jndi-name="java:jboss/exported/TestQ" use-java-context="false" pool-name="TestQ"/>
                          </admin-objects>
                      </resource-adapter>
                  </resource-adapters>
              </subsystem>
      

      Step-3) Start the AMQ broker and keep looking at the amq.log

      Step-4) Start JBoss EAP 6.3.3 and then deploy some MDB in it so that it will start consuming messages from the Queue.

      Step-5) Send a message to the AMQ queue so that it can be consumed by MBD deployed on EAP 6.3.3

      Step-6) If we will enable the TRACE logging on the "com.arjuna" package on EAP side the we will notice the Messages as mentioned in the issue descripion.

                  <logger category="com.arjuna">
                      <level name="TRACE"/>
                  </logger>
      
      Show
      Step-1) Deploy the "activemq-rar-5.9.0.redhat-610379.rar" on JBoss EAP 6.3.3 side. (I deployed it with a different name "activemq-ra.rar" so further configuratiuons will be accordingly) Step-2) Edit the resource-adapter subsystem of JBoss EAP standalone.xml file by adding the following entry in it: <subsystem xmlns= "urn:jboss:domain:resource-adapters:1.1" > <resource-adapters> <resource-adapter id= "activemq-ra.rar" > <archive> activemq-ra.rar </archive> <transaction-support>XATransaction</transaction-support> <config-property name= "InitialRedeliveryDelay" > 5000 </config-property> <config-property name= "MaximumRedeliveries" > 4 </config-property> <config-property name= "Password" > admin </config-property> <config-property name= "UserName" > admin </config-property> <config-property name= "ServerUrl" > tcp: //localhost:61616 </config-property> <connection-definitions> <connection-definition class- name= "org.apache.activemq.ra.ActiveMQManagedConnectionFactory" jndi-name= "java:jboss/exported/activemq/ActiveMQQueueConnectionFactory" enabled= " true " use-java-context= " false " pool-name= "java:/jms/ActiveMQPool" use-ccm= " false " > <xa-pool> <min-pool-size>10</min-pool-size> <max-pool-size>15</max-pool-size> </xa-pool> <recovery> <recover-credential> <user-name>admin</user-name> <password>admin</password> </recover-credential> </recovery> </connection-definition> </connection-definitions> <admin-objects> <admin-object class- name= "org.apache.activemq.command.ActiveMQQueue" jndi-name= "java:jboss/exported/TestQ" use-java-context= " false " pool-name= "TestQ" /> </admin-objects> </resource-adapter> </resource-adapters> </subsystem> Step-3) Start the AMQ broker and keep looking at the amq.log Step-4) Start JBoss EAP 6.3.3 and then deploy some MDB in it so that it will start consuming messages from the Queue. Step-5) Send a message to the AMQ queue so that it can be consumed by MBD deployed on EAP 6.3.3 Step-6) If we will enable the TRACE logging on the "com.arjuna" package on EAP side the we will notice the Messages as mentioned in the issue descripion. <logger category= "com.arjuna" > <level name= "TRACE" /> </logger>

      • When using ActiveMQ resource adapter noticing the following WARN message appearing in the AMQ logs every 130 seconds:
        2015-03-19 10:03:41,552 | WARN  | .0.1:43615@61616 | Transport                        | ivemq.broker.TransportConnection  205 | 121 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Transport Connection to: tcp://127.0.0.1:43615 failed: java.io.EOFException
        .
        .
        .
        2015-03-19 10:05:51,683 | WARN  | .0.1:43616@61616 | Transport                        | ivemq.broker.TransportConnection  205 | 121 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Transport Connection to: tcp://127.0.0.1:43616 failed: java.io.EOFException
        .
        .
        2015-03-19 10:08:01,792 | WARN  | .0.1:43695@61616 | Transport                        | ivemq.broker.TransportConnection  205 | 121 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Transport Connection to: tcp://127.0.0.1:43695 failed: java.io.EOFException
        
      • On the JBoss EAP 6.3.3 side where the resource adapter was used the following TRACE level logging observed during the time of WARN messages:
      10:03:41,530 TRACE [com.arjuna.ats.arjuna] (Periodic Recovery) OutputObjectState::OutputObjectState()
      10:03:41,569 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of RecoveryOnlyEJBXAResource{receiverContext=EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@49be3a77, receiver=org.jboss.as.ejb3.remote.LocalEjbReceiver@67f08073}, transactionOriginNodeIdentifier='1'}
      10:03:41,569 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) Found 0 xids in doubt
      10:03:41,570 TRACE [com.arjuna.ats.arjuna] (Periodic Recovery) RecoveryXids updateIfEquivalentRM2 RecoveryOnlyEJBXAResource{receiverContext=EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@49be3a77, receiver=org.jboss.as.ejb3.remote.LocalEjbReceiver@67f08073}, transactionOriginNodeIdentifier='1'} 1426739621570
      10:03:41,570 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of XAResourceWrapperImpl@3ba9398b[xaResource=org.apache.activemq.ra.ActiveMQManagedConnection$1@6300f346 pad=false overrideRmValue=null productName=ActiveMQ productVersion=5.9.0.redhat-610379 jndiName=java:jboss/exported/activemq/ActiveMQQueueConnectionFactory]
      .
      .
      .
      10:05:51,680 TRACE [com.arjuna.ats.arjuna] (Periodic Recovery) OutputObjectState::OutputObjectState()
      10:05:51,684 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of RecoveryOnlyEJBXAResource{receiverContext=EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@49be3a77, receiver=org.jboss.as.ejb3.remote.LocalEjbReceiver@67f08073}, transactionOriginNodeIdentifier='1'}
      10:05:51,684 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) Found 0 xids in doubt
      10:05:51,684 TRACE [com.arjuna.ats.arjuna] (Periodic Recovery) RecoveryXids updateIfEquivalentRM2 RecoveryOnlyEJBXAResource{receiverContext=EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@49be3a77, receiver=org.jboss.as.ejb3.remote.LocalEjbReceiver@67f08073}, transactionOriginNodeIdentifier='1'} 1426739751684
      10:05:51,685 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of XAResourceWrapperImpl@6809bc91[xaResource=org.apache.activemq.ra.ActiveMQManagedConnection$1@573b08f3 pad=false overrideRmValue=null productName=ActiveMQ productVersion=5.9.0.redhat-610379 jndiName=java:jboss/exported/activemq/ActiveMQQueueConnectionFactory]
      .
      .
      .
      10:08:01,788 TRACE [com.arjuna.ats.arjuna] (Periodic Recovery) OutputObjectState::OutputObjectState()
      10:08:01,796 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of RecoveryOnlyEJBXAResource{receiverContext=EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@49be3a77, receiver=org.jboss.as.ejb3.remote.LocalEjbReceiver@67f08073}, transactionOriginNodeIdentifier='1'}
      10:08:01,797 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) Found 0 xids in doubt
      10:08:01,797 TRACE [com.arjuna.ats.arjuna] (Periodic Recovery) RecoveryXids updateIfEquivalentRM2 RecoveryOnlyEJBXAResource{receiverContext=EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@49be3a77, receiver=org.jboss.as.ejb3.remote.LocalEjbReceiver@67f08073}, transactionOriginNodeIdentifier='1'} 1426739881797
      10:08:01,797 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of XAResourceWrapperImpl@30b6cebb[xaResource=org.apache.activemq.ra.ActiveMQManagedConnection$1@31be6ff9 pad=false overrideRmValue=null productName=ActiveMQ productVersion=5.9.0.redhat-610379 jndiName=java:jboss/exported/activemq/ActiveMQQueueConnectionFactory]
      

        1. RaXaResourceCloseTest.java
          2 kB
          Gary Tully
        2. server.log
          8 kB
          Jay SenSharma

              gmurthy@redhat.com Ganesh Murthy
              jaysensharma Jay SenSharma (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: