public SubordinateCoordinatorCompletionParticipantStub(SubordinateBACoordinator coordinator) { this.coordinator = coordinator; this.coordinatorId = coordinator.get_uid().stringForm(); this.recovered = false; this.manager = null; }
public SubordinateCoordinatorCompletionParticipantStub(SubordinateBACoordinator coordinator) { this.coordinator = coordinator; this.coordinatorId = coordinator.get_uid().stringForm(); this.recovered = false; this.manager = null; }
/** * return a uid for the corodinator completion participant registered on behalf of this coordinator */ public String getCoordinatorCompletionParticipantid() { return PARTICIPANT_PREFIX + get_uid().stringForm() + "_CCP"; }
protected static synchronized void removeRecoveredCoordinator(SubordinateBACoordinator coordinator) { recoveredCoordinators.remove(coordinator.get_uid().stringForm()); }
/** * return a uid for the corodinator completion participant registered on behalf of this coordinator */ public String getCoordinatorCompletionParticipantid() { return PARTICIPANT_PREFIX + get_uid().stringForm() + "_CCP"; }
protected static synchronized void removeRecoveredCoordinator(SubordinateBACoordinator coordinator) { recoveredCoordinators.remove(coordinator.get_uid().stringForm()); }
public SubordinateCoordinatorCompletionParticipantStub(SubordinateBACoordinator coordinator) { this.coordinator = coordinator; this.coordinatorId = coordinator.get_uid().stringForm(); this.recovered = false; this.manager = null; }
protected static synchronized void addRecoveredCoordinator(SubordinateBACoordinator coordinator) { recoveredCoordinators.put(coordinator.get_uid().stringForm(), coordinator); }
protected static synchronized void addRecoveredCoordinator(SubordinateBACoordinator coordinator) { recoveredCoordinators.put(coordinator.get_uid().stringForm(), coordinator); }
/** * test whether a transaction has been restored without its proxy participant. this indicates that * we crashed between preparing the suborindate TX and logging the proxy participant. * @return */ public boolean isOrphaned() { String id = get_uid().stringForm(); if (isActiveProxy(id)) { return false; } // the proxy may have been removed because this tx has been resolved while we were checking if (getRecoveredCoordinator(id) == null) { return false; } // ok we have a tx but no proxy so this is really an orphan return true; }
/** * test whether a transaction has been restored without its proxy participant. this indicates that * we crashed between preparing the suborindate TX and logging the proxy participant. * @return */ public boolean isOrphaned() { String id = get_uid().stringForm(); if (isActiveProxy(id)) { return false; } // the proxy may have been removed because this tx has been resolved while we were checking if (getRecoveredCoordinator(id) == null) { return false; } // ok we have a tx but no proxy so this is really an orphan return true; }
/** * look for recovered subordinate transactions which do not have an associated proxy participant * rolling back any that are found. this only needs doing once after the first participant and * subordinate transaction recovery passes have both completed */ private void cullOrphanedSubordinates() { if (culledOrphanSubordinates || !(subordinateCoordinateRecoveryStarted && participantRecoveryStarted)) { return; } culledOrphanSubordinates = true; SubordinateBACoordinator[] coordinators = SubordinateBACoordinator.listRecoveredCoordinators(); for (SubordinateBACoordinator coordinator : coordinators) { if (coordinator.isOrphaned()) { RecoveryLogger.i18NLogger.warn_participant_ba_XTSBARecoveryModule_5(coordinator.get_uid()); coordinator.cancel(); } } }
/** * look for recovered subordinate transactions which do not have an associated proxy participant * rolling back any that are found. this only needs doing once after the first participant and * subordinate transaction recovery passes have both completed */ private void cullOrphanedSubordinates() { if (culledOrphanSubordinates || !(subordinateCoordinateRecoveryStarted && participantRecoveryStarted)) { return; } culledOrphanSubordinates = true; SubordinateBACoordinator[] coordinators = SubordinateBACoordinator.listRecoveredCoordinators(); for (SubordinateBACoordinator coordinator : coordinators) { if (coordinator.isOrphaned()) { RecoveryLogger.i18NLogger.warn_participant_ba_XTSBARecoveryModule_5(coordinator.get_uid()); coordinator.cancel(); } } }
/** * look for recovered subordinate transactions which do not have an associated proxy participant * rolling back any that are found. this only needs doing once after the first participant and * subordinate transaction recovery passes have both completed */ private void cullOrphanedSubordinates() { if (culledOrphanSubordinates || !(subordinateCoordinateRecoveryStarted && participantRecoveryStarted)) { return; } culledOrphanSubordinates = true; SubordinateBACoordinator[] coordinators = SubordinateBACoordinator.listRecoveredCoordinators(); for (SubordinateBACoordinator coordinator : coordinators) { if (coordinator.isOrphaned()) { RecoveryLogger.i18NLogger.warn_participant_ba_XTSBARecoveryModule_5(coordinator.get_uid()); coordinator.cancel(); } } }
/** * 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; }
coordinationContext.setCoordinationType(BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME); CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier(); String txId = subTx.get_uid().stringForm(); identifier.setValue("urn:" + txId); coordinationContext.setIdentifier(identifier) ;
coordinationContext.setCoordinationType(BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME); CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier(); String txId = subTx.get_uid().stringForm(); identifier.setValue("urn:" + txId); coordinationContext.setIdentifier(identifier) ;