protected final boolean isAncestorOf (Lock heldLock) { if (txojLogger.logger.isTraceEnabled()) { txojLogger.logger.trace("LockManager::isAncestorOf(" + heldLock.getCurrentOwner() + ")"); } BasicAction action = BasicAction.Current(); if (action == null) return false; /* no action no ancestry! */ return action.isAncestor(heldLock.getCurrentOwner()); }
private final synchronized void merge (AbstractRecord A) { int as; if ((as = parentAction.add(A)) != AddOutcome.AR_ADDED) { A = null; if (as == AddOutcome.AR_REJECTED) tsLogger.i18NLogger.warn_coordinator_BasicAction_68(); } }
public int start (BasicAction parentAction) { if (parentAction != null) parentAction.addChildAction(this); return super.Begin(parentAction); }
+ get_uid()); criticalStart(); while ((preparedList != null) && (preparedList.size() > 0)) doCleanup(preparedList); while ((readonlyList != null) && (readonlyList.size() > 0)) doCleanup(readonlyList); while ((pendingList != null) && (pendingList.size() > 0)) doCleanup(pendingList); criticalEnd();
return super.modified(); BasicAction action = BasicAction.Current(); tsLogger.i18NLogger.warn_StateManager_10(); if ((modifyingActions.size() > 0) && (modifyingActions.get(action.get_uid()) != null)) modifyingActions.put(action.get_uid(), action); OutputObjectState state = new OutputObjectState(objectUid, type()); int rStatus = AddOutcome.AR_ADDED; if ((rStatus = action.add(record)) != AddOutcome.AR_ADDED) modifyingActions.remove(action.get_uid()); // remember to unregister with action
public static void create (Thread thread) throws IllegalArgumentException { /* * New thread should not be running yet, so this * should work! */ final String threadId = ThreadUtil.getThreadId(thread) ; if (actions.get(threadId) == null) { BasicAction currentAction = BasicAction.Current(); if (currentAction != null) { currentAction.addChildThread(thread); actions.put(threadId, currentAction); currentAction = null; } } else throw new IllegalArgumentException(); }
ok = recordBeingHandled.topLevelAbort(); else ok = recordBeingHandled.nestedAbort(); && (recordBeingHandled.propagateOnAbort())) merge(recordBeingHandled); updateHeuristic(TwoPhaseOutcome.FINISH_OK, false); // remember || (ok == TwoPhaseOutcome.HEURISTIC_MIXED) || (ok == TwoPhaseOutcome.HEURISTIC_HAZARD))) { if (actionType == ActionType.TOP_LEVEL) tsLogger.i18NLogger.warn_coordinator_BasicAction_52(get_uid(), TwoPhaseOutcome.stringForm(ok)); else tsLogger.i18NLogger.warn_coordinator_BasicAction_53(get_uid(), TwoPhaseOutcome.stringForm(ok)); updateHeuristic(ok, false); heuristicList.insert(recordBeingHandled); tsLogger.i18NLogger.warn_coordinator_BasicAction_54(get_uid(), TwoPhaseOutcome.stringForm(ok), RecordType.typeToClass(recordBeingHandled.typeIs()).getCanonicalName()); else tsLogger.i18NLogger.warn_coordinator_BasicAction_55(get_uid(), TwoPhaseOutcome.stringForm(ok), RecordType.typeToClass(recordBeingHandled.typeIs()).getCanonicalName());
+ get_uid()); ParticipantStore aaStore = getStore(); OutputObjectState oState = new OutputObjectState(); if (save_state(oState, ObjectType.ANDPERSISTENT)) deactivated = aaStore.write_committed(getSavingUid(), type(), oState); tsLogger.i18NLogger.warn_coordinator_BasicAction_5a(get_uid(), type());
+ get_uid()); switch (actionStatus) { case ActionStatus.CREATED: tsLogger.i18NLogger.warn_coordinator_BasicAction_39(get_uid()); break; case ActionStatus.ABORTED: tsLogger.i18NLogger.warn_coordinator_BasicAction_40(get_uid()); break; default: tsLogger.i18NLogger.warn_coordinator_BasicAction_41(get_uid()); break; checkIsCurrent(); checkChildren(false); while (pendingList.size() > 0) doAbort(pendingList, false); // turn off heuristics reporting forgetHeuristics(); ActionManager.manager().remove(get_uid());
+ get_uid()); ParticipantStore aaStore = getStore(); InputObjectState oState = aaStore.read_committed(getSavingUid(), type()); restored = restore_state(oState, ObjectType.ANDPERSISTENT); tsLogger.i18NLogger.warn_coordinator_BasicAction_5(get_uid(), type());
owners = new ActionHierarchy(0); BasicAction curr = BasicAction.Current(); applicUid = new Uid(); applicUid = new Uid(); owners.copy(curr.getHierarchy());
synchronized ( ActionManager.manager() ) basic_action = (BasicAction)ActionManager.manager().get( tranUid ); action_status = basic_action.status(); tsLogger.i18NLogger.warn_recovery_ActionStatusService_3(ex);
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 String topLevelUid () throws SystemException { if (rootAction != null) return rootAction.get_uid().stringForm(); else return null; }
public int cancel () { if (TxControl.enableStatistics) TxStats.incrementApplicationRollbacks(); if (parent() != null) parent().removeChildAction(this); // beforeCompletion(); int outcome = super.Abort(); afterCompletion(outcome); return outcome; }
/** * Destructor. */ public void finalize () throws Throwable { if (tsLogger.arjLogger.isDebugEnabled()) { tsLogger.arjLogger.debug(DebugLevel.DESTRUCTORS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_STATE_MAN, "StateManager.finalize() for object-id " + get_uid() + " type " + type()); } if (currentStatus == ObjectStatus.ACTIVE_NEW) { BasicAction action = BasicAction.Current(); if ((action != null) && (action.status() == ActionStatus.RUNNING)) { if (tsLogger.arjLoggerI18N.isWarnEnabled()) tsLogger.arjLoggerI18N .warn("com.arjuna.ats.arjuna.StateManager_1"); cleanup(false); } } }