public int doPrepare () { int status = super.status(); // In JTA spec, beforeCompletions are run on commit attempts only, not rollbacks. // We attempt to mimic that here, even though we are outside the scope of the spec. // note it's not perfect- async timeout/rollback means there is a race condition in which we // can still call beforeCompletion on rollbacks, but that's not too bad as skipping it is really // just an optimization anyhow. JBTM-429 if ( !(status == ActionStatus.ABORT_ONLY || status == ActionStatus.ABORTING) && doBeforeCompletion()) { int outcome = super.prepare(true); if(outcome == TwoPhaseOutcome.PREPARE_READONLY) { // we won't get called again, so we need to clean up // and run the afterCompletions before returning. doCommit(); } return outcome; } else { super.phase2Abort(true); return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int doPrepare () { int status = super.status(); // JBTM-927 it is possible this transaction has been aborted by the TransactionReaper if (status == ActionStatus.ABORTED) { return TwoPhaseOutcome.PREPARE_NOTOK; } // In JTA spec, beforeCompletions are run on commit attempts only, not rollbacks. // We attempt to mimic that here, even though we are outside the scope of the spec. // note it's not perfect- async timeout/rollback means there is a race condition in which we // can still call beforeCompletion on rollbacks, but that's not too bad as skipping it is really // just an optimization anyhow. JBTM-429 if ( !(status == ActionStatus.ABORT_ONLY || status == ActionStatus.ABORTING) && doBeforeCompletion()) { int outcome = super.prepare(true); if(outcome == TwoPhaseOutcome.PREPARE_READONLY) { // we won't get called again, so we need to clean up // and run the afterCompletions before returning. doCommit(); } return outcome; } else { super.phase2Abort(true); super.afterCompletion(Status.STATUS_ROLLEDBACK); return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int doPrepare () { int status = super.status(); // JBTM-927 it is possible this transaction has been aborted by the TransactionReaper if (status == ActionStatus.ABORTED) { return TwoPhaseOutcome.PREPARE_NOTOK; } // In JTA spec, beforeCompletions are run on commit attempts only, not rollbacks. // We attempt to mimic that here, even though we are outside the scope of the spec. // note it's not perfect- async timeout/rollback means there is a race condition in which we // can still call beforeCompletion on rollbacks, but that's not too bad as skipping it is really // just an optimization anyhow. JBTM-429 if ( !(status == ActionStatus.ABORT_ONLY || status == ActionStatus.ABORTING) && doBeforeCompletion()) { int outcome = super.prepare(true); if(outcome == TwoPhaseOutcome.PREPARE_READONLY) { // we won't get called again, so we need to clean up // and run the afterCompletions before returning. doCommit(); } return outcome; } else { super.phase2Abort(true); super.afterCompletion(Status.STATUS_ROLLEDBACK); return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int doPrepare () { int status = super.status(); // JBTM-927 it is possible this transaction has been aborted by the TransactionReaper if (status == ActionStatus.ABORTED) { return TwoPhaseOutcome.PREPARE_NOTOK; } // In JTA spec, beforeCompletions are run on commit attempts only, not rollbacks. // We attempt to mimic that here, even though we are outside the scope of the spec. // note it's not perfect- async timeout/rollback means there is a race condition in which we // can still call beforeCompletion on rollbacks, but that's not too bad as skipping it is really // just an optimization anyhow. JBTM-429 if ( !(status == ActionStatus.ABORT_ONLY || status == ActionStatus.ABORTING) && doBeforeCompletion()) { int outcome = super.prepare(true); if(outcome == TwoPhaseOutcome.PREPARE_READONLY) { // we won't get called again, so we need to clean up // and run the afterCompletions before returning. doCommit(); } return outcome; } else { super.phase2Abort(true); super.afterCompletion(Status.STATUS_ROLLEDBACK); return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int doPrepare () { int status = super.status(); // JBTM-927 it is possible this transaction has been aborted by the TransactionReaper if (status == ActionStatus.ABORTED) { return TwoPhaseOutcome.PREPARE_NOTOK; } // In JTA spec, beforeCompletions are run on commit attempts only, not rollbacks. // We attempt to mimic that here, even though we are outside the scope of the spec. // note it's not perfect- async timeout/rollback means there is a race condition in which we // can still call beforeCompletion on rollbacks, but that's not too bad as skipping it is really // just an optimization anyhow. JBTM-429 if ( !(status == ActionStatus.ABORT_ONLY || status == ActionStatus.ABORTING) && doBeforeCompletion()) { int outcome = super.prepare(true); if(outcome == TwoPhaseOutcome.PREPARE_READONLY) { // we won't get called again, so we need to clean up // and run the afterCompletions before returning. doCommit(); } return outcome; } else { super.phase2Abort(true); super.afterCompletion(Status.STATUS_ROLLEDBACK); return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int doPrepare () { int status = super.status(); // JBTM-927 it is possible this transaction has been aborted by the TransactionReaper if (status == ActionStatus.ABORTED) { return TwoPhaseOutcome.PREPARE_NOTOK; } // In JTA spec, beforeCompletions are run on commit attempts only, not rollbacks. // We attempt to mimic that here, even though we are outside the scope of the spec. // note it's not perfect- async timeout/rollback means there is a race condition in which we // can still call beforeCompletion on rollbacks, but that's not too bad as skipping it is really // just an optimization anyhow. JBTM-429 if ( !(status == ActionStatus.ABORT_ONLY || status == ActionStatus.ABORTING) && doBeforeCompletion()) { int outcome = super.prepare(true); if(outcome == TwoPhaseOutcome.PREPARE_READONLY) { // we won't get called again, so we need to clean up // and run the afterCompletions before returning. doCommit(); } return outcome; } else { super.phase2Abort(true); super.afterCompletion(Status.STATUS_ROLLEDBACK); return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int doPrepare () { int status = super.status(); // JBTM-927 it is possible this transaction has been aborted by the TransactionReaper if (status == ActionStatus.ABORTED) { return TwoPhaseOutcome.PREPARE_NOTOK; } // In JTA spec, beforeCompletions are run on commit attempts only, not rollbacks. // We attempt to mimic that here, even though we are outside the scope of the spec. // note it's not perfect- async timeout/rollback means there is a race condition in which we // can still call beforeCompletion on rollbacks, but that's not too bad as skipping it is really // just an optimization anyhow. JBTM-429 if ( !(status == ActionStatus.ABORT_ONLY || status == ActionStatus.ABORTING) && doBeforeCompletion()) { int outcome = super.prepare(true); if(outcome == TwoPhaseOutcome.PREPARE_READONLY) { // we won't get called again, so we need to clean up // and run the afterCompletions before returning. doCommit(); } return outcome; } else { super.phase2Abort(true); super.afterCompletion(Status.STATUS_ROLLEDBACK); return TwoPhaseOutcome.PREPARE_NOTOK; } }
int res = subAct.doCommit();
int res = subAct.doCommit();
int res = subAct.doCommit();
int res = subAct.doCommit();
int res = subAct.doCommit();
int res = subAct.doCommit();
int res = subAct.doCommit();