private void runCallback(String key) { SubordinateCallback callback = callbacks.get(key); while (callback != null) { callback.run(); callback = callback.next; } } }
/** * 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; }
public SubordinateCoordinatorCompletionParticipantStub(SubordinateBACoordinator coordinator) { this.coordinator = coordinator; this.coordinatorId = coordinator.get_uid().stringForm(); this.recovered = false; this.manager = null; }
/** * Restore the state of the particpant from the specified input object stream. * @param ios The Input object stream. * @return true if restored, false otherwise. */ public boolean restoreState(InputObjectState ios) { // restore the subordinate coordinator id so we can check to ensure it has been committed try { coordinatorId = ios.unpackString(); SubordinateBACoordinator.addActiveProxy(coordinatorId); return true; } catch (IOException e) { return false; } }
public void fail (final QName exceptionIdentifier) throws SystemException { try { _theTx.participantFaulted(_participantId); } catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex) { throw new SystemException("UnknownParticipantException"); } catch (com.arjuna.mw.wsas.exceptions.SystemException ex) { throw new SystemException(ex.toString()); } }
/** * this is driven by a coordinator-completion participant registered on behalf of the coordinator * and is required to propagate the complete to all registered coordinator-completion participants. * @return the result of preparing the transaction */ public void complete () throws WrongStateException, SystemException { // if this goes wrong here then we will throw an exception super.complete(); // now we need to run phase one of commit // TODO -- need to do completion processing here? int outcome = super.prepare(true); // if we have prepared ok (or are read only) then status will be COMMITTING if (outcome == TwoPhaseOutcome.PREPARE_NOTOK) { // phase 1 failed so we need to run phase 2 abort // this will set status to ABORTED phase2Abort(true); } // no need to return anything as the caller can just check the status }
/** * 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; }
public SubordinateCoordinatorCompletionParticipantStub(SubordinateBACoordinator coordinator) { this.coordinator = coordinator; this.coordinatorId = coordinator.get_uid().stringForm(); this.recovered = false; this.manager = null; }
/** * Restore the state of the particpant from the specified input object stream. * @param ios The Input object stream. * @return true if restored, false otherwise. */ public boolean restoreState(InputObjectState ios) { // restore the subordinate coordinator id so we can check to ensure it has been committed try { coordinatorId = ios.unpackString(); SubordinateBACoordinator.addActiveProxy(coordinatorId); return true; } catch (IOException e) { return false; } }
public void fail (final QName exceptionIdentifier) throws SystemException { try { _theTx.participantFaulted(_participantId); } catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex) { throw new SystemException("UnknownParticipantException"); } catch (com.arjuna.mw.wsas.exceptions.SystemException ex) { throw new SystemException(ex.toString()); } }
private void runCallback(String key) { SubordinateCallback callback = callbacks.get(key); while (callback != null) { callback.run(); callback = callback.next; } } }
/** * return a uid for the corodinator completion participant registered on behalf of this coordinator */ public String getCoordinatorCompletionParticipantid() { return PARTICIPANT_PREFIX + get_uid().stringForm() + "_CCP"; }
/** * Restore the state of the particpant from the specified input object stream. * @param ios The Input object stream. * @return true if restored, false otherwise. */ public boolean restoreState(InputObjectState ios) { // restore the subordinate coordinator id so we can check to ensure it has been committed try { coordinatorId = ios.unpackString(); SubordinateBACoordinator.addActiveProxy(coordinatorId); return true; } catch (IOException e) { return false; } }
public void fail (final QName exceptionIdentifier) throws SystemException { try { _theTx.participantFaulted(_participantId); } catch (com.arjuna.mw.wscf.exceptions.InvalidParticipantException ex) { throw new SystemException("UnknownParticipantException"); } catch (com.arjuna.mw.wsas.exceptions.SystemException ex) { throw new SystemException(ex.toString()); } }
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()); }
protected static synchronized void removeRecoveredCoordinator(SubordinateBACoordinator coordinator) { recoveredCoordinators.remove(coordinator.get_uid().stringForm()); }
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); }