/** * Get the status of a transaction that is already in the cache */ public static Status getCachedStatus (Uid actionUid) throws SystemException { TransactionCacheItem cacheItem = getKnown (actionUid); if (cacheItem != null) { return cacheItem.getStatus(); } return Status.StatusNoTransaction; // used to mean it isn't cached }
public final void run() { _cachedRecoveredTransaction.replayPhase2(); _cachedRecoveredTransaction = null; tidyup(); }
public boolean assumeComplete () { final int heuristicDecision = getHeuristicDecision(); if (heuristicDecision == TwoPhaseOutcome.HEURISTIC_COMMIT || heuristicDecision == TwoPhaseOutcome.HEURISTIC_HAZARD || heuristicDecision == TwoPhaseOutcome.HEURISTIC_MIXED || heuristicDecision == TwoPhaseOutcome.HEURISTIC_ROLLBACK) { _typeName = AssumedCompleteHeuristicServerTransaction.typeName(); } else { _typeName = AssumedCompleteServerTransaction.typeName(); } return true; }
/** * Allows a new Resource to be added to the transaction. Typically this is * used to replace a Resource that has failed and cannot be recovered on * it's original IOR. */ public void addResourceRecord (Uid rcUid, Resource r) { Coordinator coord = null; AbstractRecord corbaRec = createOTSRecord(true, r, coord, rcUid); addRecord(corbaRec); }
/** * Allows a new Resource to be added to the transaction. Typically this is * used to replace a Resource that has failed and cannot be recovered on * it's original IOR. */ public void addResourceRecord (Uid rcUid, Resource r) { Coordinator coord = null; AbstractRecord corbaRec = createOTSRecord(true, r, coord, rcUid); addRecord(corbaRec); }
public boolean assumeComplete () { final int heuristicDecision = getHeuristicDecision(); if (heuristicDecision == TwoPhaseOutcome.HEURISTIC_COMMIT || heuristicDecision == TwoPhaseOutcome.HEURISTIC_HAZARD || heuristicDecision == TwoPhaseOutcome.HEURISTIC_MIXED || heuristicDecision == TwoPhaseOutcome.HEURISTIC_ROLLBACK) { _typeName = AssumedCompleteHeuristicTransaction.typeName(); } else { _typeName = AssumedCompleteTransaction.typeName(); } return true; }
public String type () { return AssumedCompleteTransaction.typeName(); } /**
/** * what is the status of the transaction in the original process ? (if alive) */ Status /* sync ? */ getOriginalStatus () { return TransactionCache.getOriginalStatus(_theTransactionUid,_theTransactionType); }
/** * Get the recovery status of the transaction */ public int getRecoveryStatus () { return TransactionCache.getRecoveryStatus(_theTransactionUid, _theTransactionType); }
/** * Get the recovery status of the transaction */ public int getRecoveryStatus () { return _cachedRecoveredTransaction.getRecoveryStatus(); }
/** * Swap an old Resource that was registered with the transaction * for a new one. The old one is identified by its * RecoveryCoordinator that was returned when the Resource was * registered. The second parameter is the new Resouce. */ public final void swapResource (Uid rcUid, Resource r) { _cachedRecoveredTransaction.addResourceRecord(rcUid, r); }
public boolean activate() { if (!activated) activated = super.activate(); return activated; }
/** * Get the status of the recovered transaction */ public final Status getStatus () { return _cachedRecoveredTransaction.get_status(); }
/** * Starts the thread to replay phase 2 of the transaction in the background. */ public final void replayPhase2() { start(); }
/** * Get the status of a transaction that is already in the cache */ public static Status getCachedStatus (Uid actionUid) throws SystemException { TransactionCacheItem cacheItem = getKnown (actionUid); if (cacheItem != null) { return cacheItem.getStatus(); } return Status.StatusNoTransaction; // used to mean it isn't cached }
public final void run() { _cachedRecoveredTransaction.replayPhase2(); _cachedRecoveredTransaction = null; tidyup(); }
/** * Allows a new Resource to be added to the transaction. Typically this is * used to replace a Resource that has failed and cannot be recovered on * it's original IOR. */ public void addResourceRecord (Uid rcUid, Resource r) { Coordinator coord = null; AbstractRecord corbaRec = createOTSRecord(true, r, coord, rcUid); addRecord(corbaRec); }
/** * Allows a new Resource to be added to the transaction. Typically this is * used to replace a Resource that has failed and cannot be recovered on * it's original IOR. */ public void addResourceRecord (Uid rcUid, Resource r) { Coordinator coord = null; AbstractRecord corbaRec = createOTSRecord(true, r, coord, rcUid); addRecord(corbaRec); }
public String type () { return AssumedCompleteTransaction.typeName(); } /**
/** * what is the status of the transaction in the original process ? (if alive) */ Status /* sync ? */ getOriginalStatus () { return TransactionCache.getOriginalStatus(_theTransactionUid,_theTransactionType); }