/** * this is driven by a coordinator-completion participant registered on behalf of the coordinator * and is required to propagate the cancel to all registered participants. */ public int cancel () { int status = status(); int result; // TODO -- check if there is a window here where status could change to COMMITTING if (status == ActionStatus.COMMITTING) { phase2Abort(true); result = status(); } else { result = super.cancel(); } SubordinateBACoordinator.removeRecoveredCoordinator(this); // run any callback associated with this transaction runCallback(get_uid().stringForm()); return result; }
/** * this is driven by a coordinator-completion participant registered on behalf of the coordinator * and is required to propagate the cancel to all registered participants. */ public int cancel () { int status = status(); int result; // TODO -- check if there is a window here where status could change to COMMITTING if (status == ActionStatus.COMMITTING) { phase2Abort(true); result = status(); } else { result = super.cancel(); } SubordinateBACoordinator.removeRecoveredCoordinator(this); // run any callback associated with this transaction runCallback(get_uid().stringForm()); return result; }
/** * this is driven by a coordinator-completion participant registered on behalf of the coordinator * and is required to propagate the close to all registered participants. */ public int close () throws SystemException { int status = status(); int result; if (status == ActionStatus.COMMITTING) { // TODO -- need to do completion processing here? // we already completed and ran phase 1 so do a phase 2 commit phase2Commit(true); result = status(); } else { // we have not yet completed so we can rely upon the parent implementation to do // everything we need result = super.close(); } // if we have completed then remove the coordinator from the recovered coordinators table if (status() != ActionStatus.COMMITTING) { SubordinateBACoordinator.removeRecoveredCoordinator(this); } // run any callback associated with this transaction runCallback(get_uid().stringForm()); return result; }
/** * this is driven by a coordinator-completion participant registered on behalf of the coordinator * and is required to propagate the close to all registered participants. */ public int close () throws SystemException { int status = status(); int result; if (status == ActionStatus.COMMITTING) { // TODO -- need to do completion processing here? // we already completed and ran phase 1 so do a phase 2 commit phase2Commit(true); result = status(); } else { // we have not yet completed so we can rely upon the parent implementation to do // everything we need result = super.close(); } // if we have completed then remove the coordinator from the recovered coordinators table if (status() != ActionStatus.COMMITTING) { SubordinateBACoordinator.removeRecoveredCoordinator(this); } // run any callback associated with this transaction runCallback(get_uid().stringForm()); return result; }