if (abort) { if (hasStatusListeners) notifyStatusListeners ( session, TransactionStatusEvent.State.PREPARING_FOR_ABORT, id, getName(p), context ); notifyStatusListeners ( session, TransactionStatusEvent.State.PREPARING, id, getName(p), context );
protected void commit (int session, long id, Serializable context, List<TransactionParticipant> members, boolean recover, LogEvent evt, Profiler prof) { for (TransactionParticipant p :members) { if (recover && p instanceof ContextRecovery) { context = ((ContextRecovery) p).recover (id, context, true); if (evt != null) evt.addMessage (" commit-recover: " + getName(p)); } if (hasStatusListeners) notifyStatusListeners ( session, TransactionStatusEvent.State.COMMITING, id, getName(p), context ); commit (p, id, context); if (evt != null) { evt.addMessage (" commit: " + getName(p)); if (prof != null) prof.checkPoint (" commit: " + getName(p)); } } } protected void abort
protected void abort (int session, long id, Serializable context, List<TransactionParticipant> members, boolean recover, LogEvent evt, Profiler prof) { for (TransactionParticipant p :members) { if (recover && p instanceof ContextRecovery) { context = ((ContextRecovery) p).recover (id, context, false); if (evt != null) evt.addMessage (" abort-recover: " + getName(p)); } if (hasStatusListeners) notifyStatusListeners ( session, TransactionStatusEvent.State.ABORTING, id, getName(p), context ); abort(p, id, context); if (evt != null) { evt.addMessage (" abort: " + getName(p)); if (prof != null) prof.checkPoint (" abort: " + getName(p)); } } } protected int prepareForAbort
try { if (hasStatusListeners) notifyStatusListeners (session, TransactionStatusEvent.State.READY, id, "", null); activeTransactions.decrementAndGet(); if (hasStatusListeners) { notifyStatusListeners ( session, paused ? TransactionStatusEvent.State.PAUSED : TransactionStatusEvent.State.DONE,