3 Replies Latest reply on Jul 9, 2009 11:17 AM by Andrew Dinn

    XAResourceRecovery status

    adam slachta Newbie

      Hello,
      where can I find meaning of the "status numbers" in the jboss's server.log during the XARecovery periodic scan?

      Status is ?


      2009-07-03 10:24:24.513 [Server.Connection:192.168.1.236:36159] DEBUG [arjLoggerI18N] - [com.arjuna.ats.arjuna.recovery.ActionStatusService_1] - transactionType: /StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction uid: -3f57fe14:d845:4a4d20ca:109ae
       Status is 7
      2009-07-03 10:24:24.515 [Thread-6] 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, 31, 29, 1--3f57fe14:d845:4a4d20ca:109ae-3f57fe14:d845:4a4d20ca:109e7 >
      2009-07-03 10:24:24.516 [Server.Connection:192.168.1.236:36159] DEBUG [arjLoggerI18N] - [com.arjuna.ats.arjuna.recovery.ActionStatusService_1] - transactionType: /StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction uid: -3f57fe14:d845:4a4d20ca:10339
       Status is 6
      2009-07-03 10:24:24.517 [Thread-6] DEBUG [txojLoggerI18N] - [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
      2009-07-03 10:24:24.517 [Server.Connection:192.168.1.236:36159] DEBUG [arjLoggerI18N] - [com.arjuna.ats.arjuna.recovery.ActionStatusService_1] - transactionType: /StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction uid: -3f57fe14:d845:4a4d20ca:10954
       Status is 6
      


      Thank you very much for your time.

      Adam

        • 1. Re: XAResourceRecovery status
          Andrew Dinn Master

           


          where can I find meaning of the "status numbers" in the jboss's server.log during the XARecovery periodic scan?


          The information you need to employ is in the message:


          2009-07-03 10:24:24.513 [Server.Connection:192.168.1.236:36159] DEBUG [arjLoggerI18N] - [com.arjuna.
          ats.arjuna.recovery.ActionStatusService_1] - transactionType: /StateManager/BasicAction/TwoPhaseCoor
          dinator/AtomicAction uid: -3f57fe14:d845:4a4d20ca:109ae
          Status is 7


          The tag com.arjuna.ats.arjuna.recovery.ActionStatusService_1 identifies the class generating the message. Look for class ActionStatusService in the sources for the TS code and then search for _1 to find where the message is defined and generated:


           * @message com.arjuna.ats.arjuna.recovery.ActionStatusService_1 [com.arjuna.ats.arjuna.recovery.ActionStatusService_1] - transactionType: {0} uid: {1} \n Status is {2}
           ...
           int status = getTransactionStatus( transactionType, strUid );
           String strStatus = Integer.toString( status );
          
           out.println( strStatus );
           out.flush();
          
           if (tsLogger.arjLoggerI18N.isInfoEnabled())
           {
           tsLogger.arjLoggerI18N.info("com.arjuna.ats.arjuna.recovery.ActionStatusService_1",
           new Object[]{transactionType, strUid, strStatus});
           }
          


          The status is derived from the following call

           int status = getTransactionStatus( transactionType, strUid );
          


          If you look up method getTransactionStatus you will see that the returned value is assigned initially to ActionStatus.INVALID and then possiblyu reassigned depending upon the transaction state. So, class ActionStatus is clearly the one which defines these constants.

          Find class ActonStatus using your favourite IDE (emacs with etags support is very effective, I find ;-) and *ciola* you see that 7 is ActionStatus.COMMITTED and so on.

           public static final int RUNNING = 0;
           public static final int PREPARING = 1;
           public static final int ABORTING = 2;
           public static final int ABORT_ONLY = 3;
           public static final int ABORTED = 4;
           public static final int PREPARED = 5;
           public static final int COMMITTING = 6;
           public static final int COMMITTED = 7;
           public static final int CREATED = 8;
           public static final int INVALID = 9;
           public static final int CLEANUP = 10;
           public static final int H_ROLLBACK = 11;
           public static final int H_COMMIT = 12;
           public static final int H_MIXED = 13;
           public static final int H_HAZARD = 14;
           public static final int DISABLED = 15;
           public static final int NO_ACTION = 16;
          


          There, you never knew browsing the TS sources could be such fun.



          • 2. Re: XAResourceRecovery status
            adam slachta Newbie

            adinn thank you very much. Very nicely explained.

            • 3. Re: XAResourceRecovery status
              Andrew Dinn Master

               


              adinn thank you very much. Very nicely explained.


              hmm, I was impressed too -- apart from the fact that I misspelled *viola* (pronounced 'wallah!!!' by gli cognoscenti :-)