public void forget () throws SystemException { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("ServerTopLevelAction::forget for " + _theUid); } boolean forgot = true; if (_theControl != null) forgot = _theControl.forgetHeuristics(); destroyResource(); // causes the removal of the transaction state. if (!forgot) throw new BAD_OPERATION(); }
private final String hierarchytoString(ServerTopLevelAction action) { String hier = "InterposedHierarchy:"; if (action != null) { hier += action.get_uid(); List<ServerNestedAction> children = action.getChildren(); synchronized (children) { for(ServerNestedAction child : children) { hier += "\n"+child.get_uid(); hier += child.getChildren(2); } } } else hier += "EMPTY"; return hier; }
_resourceRef = getReference(); if (!(_valid = registerResource(realCoordinator))) {
protected synchronized void destroyResource () { if (!_destroyed) { try { if (Interposition.destroy(get_uid())) _destroyed = true; } catch (Exception e) { jtsLogger.i18NLogger.warn_orbspecific_interposition_resources_arjuna_generror("ServerTopLevelAction.destroyResource", e); } try { if (_theResource != null) { ORBManager.getPOA().shutdownObject(_theResource); _theResource = null; } } catch (Exception e) { jtsLogger.i18NLogger.warn_orbspecific_interposition_resources_arjuna_generror("ServerTopLevelAction.destroyResource", e); } } tidyup(); }
tmpCoord, tmpTerm, ctx.timeout); action = new ServerTopLevelAction(control); ((ServerTopLevelAction) action).rollback(); // does dispose as well! if (((ServerTopLevelAction)action).isTransactionInactive()) { throw new TRANSACTION_UNAVAILABLE(jtsLogger.i18NLogger.get_transaction_was_inactive(), 1, CompletionStatus.COMPLETED_NO); } else {
destroyResource(); return; if (!valid()) destroyResource(); case ActionStatus.ABORTED: case ActionStatus.H_ROLLBACK: destroyResource(); break; case ActionStatus.COMMITTED: case ActionStatus.H_COMMIT: destroyResource(); throw new HeuristicCommit(); case ActionStatus.H_MIXED: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicMixed(); case ActionStatus.H_HAZARD: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicHazard(); default: destroyResource(); break;
destroyResource(); // won't necessarily get another invocation! return Vote.VoteReadOnly; rollback(); return Vote.VoteCommit; case TwoPhaseOutcome.PREPARE_NOTOK: destroyResource(); // won't necessarily get another invocation! destroyResource(); // won't necessarily get another invocation! case TwoPhaseOutcome.HEURISTIC_MIXED: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicMixed(); // will eventually get forget case TwoPhaseOutcome.HEURISTIC_HAZARD: default: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicHazard();
tmpCoord, tmpTerm, ctx.timeout); action = new ServerTopLevelAction(control); ((ServerTopLevelAction) action).rollback(); // does dispose as well!
protected final synchronized ServerTopLevelAction present (Uid actUid) { if(_head == null) { return null; } for(ServerTopLevelAction action : _head) { if(actUid.equals(action.get_uid())) { return action; } } return null; }
control = hier.control(); // top-level transaction's control
destroyResource(); return; if (!valid()) destroyResource(); case ActionStatus.ABORTED: case ActionStatus.H_ROLLBACK: destroyResource(); break; case ActionStatus.COMMITTED: case ActionStatus.H_COMMIT: destroyResource(); throw new HeuristicCommit(); case ActionStatus.H_MIXED: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicMixed(); case ActionStatus.H_HAZARD: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicHazard(); default: destroyResource(); break;
destroyResource(); // won't necessarily get another invocation! return Vote.VoteReadOnly; rollback(); return Vote.VoteCommit; case TwoPhaseOutcome.PREPARE_NOTOK: destroyResource(); // won't necessarily get another invocation! destroyResource(); // won't necessarily get another invocation! case TwoPhaseOutcome.HEURISTIC_MIXED: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicMixed(); // will eventually get forget case TwoPhaseOutcome.HEURISTIC_HAZARD: default: if (TxControl.getMaintainHeuristics()) destroyResource(); throw new HeuristicHazard();
protected final synchronized ServerTopLevelAction present (Uid actUid) { if(_head == null) { return null; } for(ServerTopLevelAction action : _head) { if(actUid.equals(action.get_uid())) { return action; } } return null; }
control = hier.control(); // top-level transaction's control
private final String hierarchytoString(ServerTopLevelAction action) { String hier = "InterposedHierarchy:"; if (action != null) { hier += action.get_uid(); List<ServerNestedAction> children = action.getChildren(); synchronized (children) { for(ServerNestedAction child : children) { hier += "\n"+child.get_uid(); hier += child.getChildren(2); } } } else hier += "EMPTY"; return hier; }