public java.util.Map<Uid, String> getSynchronizations() { java.util.Map<Uid, String> synchs = new java.util.HashMap<Uid, String> (); synchronized (_syncLock) { if (_synchs != null) { for (Object _synch : _synchs) { SynchronizationRecord synch = (SynchronizationRecord) _synch; synchs.put(synch.get_uid(), synch.toString()); } } } return synchs; }
if (parent() != null) return AddOutcome.AR_REJECTED; switch (status()) if (executingInterposedSynchs && !sr.isInterposed()) return AddOutcome.AR_REJECTED; runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncBeforeSynchronization(this, sr))); if(sr.compareTo(_currentRecord) != 1) { return AddOutcome.AR_REJECTED; if (_synchs.add(sr)) { result = AddOutcome.AR_ADDED;
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()) { runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncAfterSynchronization(this, synchRecord, myStatus))); if (!executingInterposedSynchs || _synchs.size() == 0) break; // all synchronizations have been executed runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncAfterSynchronization(this, synchRecord, myStatus))); if (!synchronizationCompletionService.take().get()) problem = true; } catch (InterruptedException e) {
} 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();
runningSynchronizations = new ArrayList<Future<Boolean>>(_synchs.size()); if (synchRecord.isInterposed()) interposedSynchs.add(synchRecord); else runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncBeforeSynchronization(this, synchRecord))); runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncBeforeSynchronization(this, synchRecord))); if (!synchronizationCompletionService.take().get()) problem = true; } catch (ExecutionException e) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(_currentRecord.toString(), e); problem = true;
copiedSynchs = (SynchronizationRecord[])_synchs.toArray(new SynchronizationRecord[] {}); while( (lastIndexProcessed < _synchs.size()-1) && !problem) { if(copiedSynchs.length != _synchs.size()) { copiedSynchs = (SynchronizationRecord[])_synchs.toArray(new SynchronizationRecord[] {}); problem = !_currentRecord.beforeCompletion(); if (!preventCommit())
Iterator iterator = _synchs.iterator(); while(iterator.hasNext()) { stack.push(iterator.next()); if (!record.afterCompletion(myStatus)) _synchs.clear();
Iterator iterator = _synchs.iterator(); while(iterator.hasNext()) { stack.push(iterator.next()); if (!record.afterCompletion(myStatus))
/** * Run the call * @return true if the call was successful and false otherwise * @throws Exception if the wrapped synchronisation throws an exception */ public Boolean call() throws Exception { // Synchronisations are executed with undefined transaction context. ThreadActionData.pushAction(coordinator, false); try { if (!synchronization.afterCompletion(_status)) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4(synchronization.toString()); return false; } return true; } catch (Exception ex) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4a(synchronization.toString(), ex); throw ex; } catch (Error er) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4b(synchronization.toString(), er); throw er; } finally { ThreadActionData.popAction(false); } } }
/** * Run the call * @return true if the call was successful and false otherwise * @throws Exception if the wrapped synchronisation throws an exception */ public Boolean call() throws Exception { // Synchronisations are executed with the transaction context of the transaction that is being committed. ThreadActionData.pushAction(coordinator, false); try { return synchronization.beforeCompletion(); } catch (Exception e) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(synchronization.toString(), e); throw e; } catch (Error e) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(synchronization.toString(), e); throw e; } finally { ThreadActionData.popAction(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()) { runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncAfterSynchronization(this, synchRecord, myStatus))); if (!executingInterposedSynchs || _synchs.size() == 0) break; // all synchronizations have been executed runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncAfterSynchronization(this, synchRecord, myStatus))); if (!synchronizationCompletionService.take().get()) problem = true; } catch (InterruptedException e) {
} 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();
runningSynchronizations = new ArrayList<Future<Boolean>>(_synchs.size()); if (synchRecord.isInterposed()) interposedSynchs.add(synchRecord); else runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncBeforeSynchronization(this, synchRecord))); runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncBeforeSynchronization(this, synchRecord))); if (!synchronizationCompletionService.take().get()) problem = true; } catch (ExecutionException e) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(_currentRecord.toString(), e); problem = true;
copiedSynchs = (SynchronizationRecord[])_synchs.toArray(new SynchronizationRecord[] {}); while( (lastIndexProcessed < _synchs.size()-1) && !problem) { if(copiedSynchs.length != _synchs.size()) { copiedSynchs = (SynchronizationRecord[])_synchs.toArray(new SynchronizationRecord[] {}); problem = !_currentRecord.beforeCompletion(); if (!preventCommit())
/** * Run the call * @return true if the call was successful and false otherwise * @throws Exception if the wrapped synchronisation throws an exception */ public Boolean call() throws Exception { // Synchronisations are executed with undefined transaction context. ThreadActionData.pushAction(coordinator, false); try { if (!synchronization.afterCompletion(_status)) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4(synchronization.toString()); return false; } return true; } catch (Exception ex) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4a(synchronization.toString(), ex); throw ex; } catch (Error er) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_4b(synchronization.toString(), er); throw er; } finally { ThreadActionData.popAction(false); } } }
/** * Run the call * @return true if the call was successful and false otherwise * @throws Exception if the wrapped synchronisation throws an exception */ public Boolean call() throws Exception { // Synchronisations are executed with the transaction context of the transaction that is being committed. ThreadActionData.pushAction(coordinator, false); try { return synchronization.beforeCompletion(); } catch (Exception e) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(synchronization.toString(), e); throw e; } catch (Error e) { tsLogger.i18NLogger.warn_coordinator_TwoPhaseCoordinator_2(synchronization.toString(), e); throw e; } finally { ThreadActionData.popAction(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()) { runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncAfterSynchronization(this, synchRecord, myStatus))); if (!executingInterposedSynchs || _synchs.size() == 0) break; // all synchronizations have been executed runningSynchronizations.add(synchronizationCompletionService.submit( new AsyncAfterSynchronization(this, synchRecord, myStatus))); if (!synchronizationCompletionService.take().get()) problem = true; } catch (InterruptedException e) {