7 Replies Latest reply on Jun 3, 2014 11:20 AM by Tom Jenkinson

    Problem during recovery aborted transaction - recovery changes status to commited

    Tomasz Lewandowski Newbie

      I have a simple MDB (JBoss 7.1 with jbossts-4.16.5) that consumes a message from HornetQ (2.2.14) and inserts it into database (PostgreSQL 9.1.10) all in global transaction. Most "crash" situations are handled ok, but there is a problem when database crashes just after preparing transaction but before sending response to TM. TM decides to abort the transaction. First it rollback message reception, then it tries to rollback database branch but database is still unavailable so it writes log file with status ABORTED. So far it's looks fine.

      Problem starts during recovery. AtomicActionRecoveryModule checks status of this transaction in ObjectStore using com.arjuna.ats.arjuna.recovery.ActionStatusService.getObjectStoreStatus(Uid, String) and get ActionStatus.COMMITTED (sic!), because this method returns ActionStatus.COMMITTED when log file exists.

      I think that ActionStatusService.getObjectStoreStatu should check action status in file contents and not just check if file exists. Can you explain this situation, please?