4 Replies Latest reply on Dec 1, 2009 2:10 PM by jelevy01

    Transaction Recovery -- XAResource + AppServerJDBCXARecovery

      Following the work that John Mazz has done in getting XAConnections to be recoverable from his article:

      http://management-platform.blogspot.com/2008/11/transaction-recovery-in-jbossas.html

      I have set up jbossjta-properties.xml in JBoss 4.2.3 for my XA Datasource, however it does seem to do any anything.

      On startup:

      14:45:21,763 DEBUG [AppServerJDBCXARecovery] AppServerJDBCXARecovery datasource classname = com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
      14:45:21,879 DEBUG [AppServerJDBCXARecovery] Created new XAConnection
      14:47:31,896 DEBUG [AppServerJDBCXARecovery] XA datasource does not support isValid method - connection will always be recreated
      14:47:31,931 DEBUG [AppServerJDBCXARecovery] Created new XAConnection
      



      I see the above output after JBoss has started so I know at least that it's being 'configured'. But the transactions never actually get recovered..

      After a failure the following keeps repeating..

      14:51:52,252 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 29, 27, 1-7f000001:eb6b:4b0ae60f:42007f000001:eb6b:4b0ae60f:425a >
      14:51:52,279 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 29, 27, 1-7f000001:eb6b:4b0ae60f:832d7f000001:eb6b:4b0ae60f:83d1 >
      14:51:52,282 WARN [loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 29, 27, 1-7f000001:eb6b:4b0ae60f:5ebc7f000001:eb6b:4b0ae60f:5f1b >
      14:51:52,302 DEBUG [AppServerJDBCXARecovery] Created new XAConnection
      


      Shouldn't it be doing more?

        • 1. Re: Transaction Recovery -- XAResource + AppServerJDBCXAReco
          jhalliday

          Are you sure the resources in question belong to mysql? If so a) have you configured the nodeid/recoverynodes? and b) are you aware there are significant limitations in mysql's XA implementation that will prevent it working in certain use cases?

          • 2. Re: Transaction Recovery -- XAResource + AppServerJDBCXAReco

            The exceptions that proceed the non-recoverable message are transaction failures, so no, I'm not positive they come from mysql / the datasource. Is there a better way to tell?

            a) have you configured the nodeid/recoverynodes?


            I have the following configured in jbossjta-properties.xml:

            
            <property name="com.arjuna.ats.arjuna.recovery.recoveryExtension1" value="com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule"/>
            <property name="com.arjuna.ats.arjuna.recovery.recoveryExtension2" value="com.arjuna.ats.internal.txoj.recovery.TORecoveryModule"/>
            <property name="com.arjuna.ats.arjuna.recovery.recoveryExtension3" value="com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule"/>
            
            ...
            
            <property name="com.arjuna.ats.arjuna.xa.nodeIdentifier" value="1"/>
            
            ...
            
            <property name="com.arjuna.ats.jta.recovery.XAResourceRecoveryJDBC" value="org.rhq.jbossatx.jta.recovery.AppServerJDBCXARecovery;MySqlDS"/>
            
            <property name="com.arjuna.ats.jta.xaRecoveryNode" value="1"/>
            
            


            Is there more that I should have?

            b) are you aware there are significant limitations in mysql's XA implementation that will prevent it working in certain use cases?


            I have read over:
            http://dev.mysql.com/doc/refman/5.0/en/xa-restrictions.html

            I'm not clear on if that should effect recovery however.

            Thanks.

            Jeremy

            • 3. Re: Transaction Recovery -- XAResource + AppServerJDBCXAReco
              vickyk

               

              <property name="com.arjuna.ats.jta.recovery.XAResourceRecoveryJDBC" value="org.rhq.jbossatx.jta.recovery.AppServerJDBCXARecovery;MySqlDS"/>



              I am confused to see the above configuration, check in this how to set the recovery plugin
              http://anonsvn.jboss.org/repos/labs/labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/internal/jbossatx/jta/AppServerJDBCXARecovery.java

              It should be like this
              <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery1" value= "com.arjuna.ats.internal.jbossatx.jta.AppServerJDBCXARecovery;jndiname=MyExampleDbName"/>


              Where does "org.rhq.jbossatx.jta.recovery.AppServerJDBCXARecovery" come from ?



              • 4. Re: Transaction Recovery -- XAResource + AppServerJDBCXAReco

                It's just the package name, the XAResourceRecoveryJDBC isn't included with JBoss 4.2.2 so depending on where you get it from just put in whatever package you want.