/** * cancel the activity * @return */ public int cancel () { return super.cancel(); }
public int end (boolean report_heuristics) { int outcome; if (parent() != null) parent().removeChildAction(this); if (beforeCompletion()) { outcome = super.End(report_heuristics); } else outcome = super.Abort(); afterCompletion(outcome); return outcome; }
public int cancel () { if (TxControl.enableStatistics) TxStats.incrementApplicationRollbacks(); if (parent() != null) parent().removeChildAction(this); // beforeCompletion(); int outcome = super.Abort(); afterCompletion(outcome); return outcome; }
tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_3(); } else if (TxControl.asyncAfterSynch && _synchs.size() > 1) { problem = asyncAfterCompletion(myStatus, report_heuristics); } else { Iterator iterator = _synchs.iterator(); try { while (iterator.hasNext()) { ((HeuristicNotification) record).heuristicOutcome(getHeuristicDecision()); if (!record.afterCompletion(myStatus)) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4(record.toString()); tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4a(record.toString(), ex); problem = true; _synchs.clear();
runningSynchronizations = new ArrayList<Future<Boolean>>(_synchs.size()); for (Iterator<SynchronizationRecord> i =_synchs.iterator(); i.hasNext(); ) { SynchronizationRecord synchRecord = i.next(); ((HeuristicNotification) synchRecord).heuristicOutcome(getHeuristicDecision()); if (synchRecord.isInterposed()) { if (!executingInterposedSynchs || _synchs.size() == 0) break; // all synchronizations have been executed
} else if (TxControl.asyncBeforeSynch && _synchs.size() > 1) { problem = !asyncBeforeCompletion(); } else { SynchronizationRecord[] copiedSynchs; copiedSynchs = (SynchronizationRecord[])_synchs.toArray(new SynchronizationRecord[] {}); while( (lastIndexProcessed < _synchs.size()-1) && !problem) { problem = !_currentRecord.beforeCompletion(); tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(_currentRecord.toString(), ex); if (_deferredThrowable == null) { _deferredThrowable = ex; tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(_currentRecord.toString(), er); if (_deferredThrowable == null) { _deferredThrowable = er; if (problem && !preventCommit()) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_1();
if (parent() != null) return AddOutcome.AR_REJECTED; switch (status()) if (executingInterposedSynchs && !sr.isInterposed()) return AddOutcome.AR_REJECTED; if(sr.compareTo(_currentRecord) != 1) { return AddOutcome.AR_REJECTED; if (_synchs.add(sr)) { result = AddOutcome.AR_ADDED;
public int start (BasicAction parentAction) { if (parentAction != null) { if (typeOfAction() == ActionType.NESTED) parentAction.addChildAction(this); } return super.Begin(parentAction); }
public int end (boolean report_heuristics) { int outcome = super.end(report_heuristics); /* * Now remove this thread from the reaper. Leave * the thread-to-tx association though. */ TransactionReaper.transactionReaper().remove(this); return outcome; }
/** * Drive afterCompletion participants. * * @param myStatus the outcome of the transaction (ActionStatus.COMMITTED or ActionStatus.ABORTED). * * @return true if successful, false otherwise. */ protected boolean afterCompletion (int myStatus) { return afterCompletion(myStatus, false); }
tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_3(); } else if (TxControl.asyncAfterSynch && _synchs.size() > 1) { problem = asyncAfterCompletion(myStatus, report_heuristics); } else { Iterator iterator = _synchs.iterator(); try { while (iterator.hasNext()) { ((HeuristicNotification) record).heuristicOutcome(getHeuristicDecision()); if (!record.afterCompletion(myStatus)) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4(record.toString()); tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4a(record.toString(), ex); problem = true; _synchs.clear();
runningSynchronizations = new ArrayList<Future<Boolean>>(_synchs.size()); for (Iterator<SynchronizationRecord> i =_synchs.iterator(); i.hasNext(); ) { SynchronizationRecord synchRecord = i.next(); ((HeuristicNotification) synchRecord).heuristicOutcome(getHeuristicDecision()); if (synchRecord.isInterposed()) { if (!executingInterposedSynchs || _synchs.size() == 0) break; // all synchronizations have been executed
} else if (TxControl.asyncBeforeSynch && _synchs.size() > 1) { problem = !asyncBeforeCompletion(); } else { SynchronizationRecord[] copiedSynchs; copiedSynchs = (SynchronizationRecord[])_synchs.toArray(new SynchronizationRecord[] {}); while( (lastIndexProcessed < _synchs.size()-1) && !problem) { problem = !_currentRecord.beforeCompletion(); tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(_currentRecord.toString(), ex); if (_deferredThrowable == null) { _deferredThrowable = ex; tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(_currentRecord.toString(), er); if (_deferredThrowable == null) { _deferredThrowable = er; if (problem && !preventCommit()) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_1();
if (parent() != null) return AddOutcome.AR_REJECTED; switch (status()) if (executingInterposedSynchs && !sr.isInterposed()) return AddOutcome.AR_REJECTED; if(sr.compareTo(_currentRecord) != 1) { return AddOutcome.AR_REJECTED; if (_synchs.add(sr)) { result = AddOutcome.AR_ADDED;
public int cancel () { if (TxStats.enabled()) TxStats.getInstance().incrementApplicationRollbacks(); if (parent() != null) parent().removeChildAction(this); // beforeCompletion(); int outcome = super.Abort(); afterCompletion(outcome); return outcome; }
public int start (BasicAction parentAction) { if (parentAction != null) { if (typeOfAction() == ActionType.NESTED) parentAction.addChildAction(this); } return super.Begin(parentAction); }
public int end (boolean report_heuristics) { int outcome = super.end(report_heuristics); /* * Now remove this thread from the reaper. Leave * the thread-to-tx association though. */ TransactionReaper.transactionReaper().remove(this); return outcome; }