This content has been marked as final.
Show 3 replies
-
1. Re: XAResourceRecovery status
adinn Jul 3, 2009 12:52 PM (in response to _adam_)
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 callint 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_ Jul 9, 2009 11:11 AM (in response to _adam_)adinn thank you very much. Very nicely explained.
-
3. Re: XAResourceRecovery status
adinn Jul 9, 2009 11:17 AM (in response to _adam_)
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 :-)