public void print (PrintWriter strm) { super.print(strm); strm.println("LockRecord"); }
public boolean restore_state (InputObjectState os, int ot) { return super.restore_state(os, ot); }
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());
if (newRecord.shouldMerge(current)) tsLogger.logger.trace("RecordList::insert("+this+") : merging "+newRecord.type()+ " and "+current.type()+" for "+newRecord.order()); newRecord.merge(current); replace(newRecord, current); if (newRecord.shouldReplace(current)) tsLogger.logger.trace("RecordList::insert("+this+") : replacing "+current.type()+ " and "+newRecord.type()+" for "+newRecord.order()); if (newRecord.shouldAdd(current)) newRecord.type()+" before "+current.type()+" for "+newRecord.order()); if (newRecord.shouldAlter(current)) newRecord.alter(current); if (newRecord.equals(current)) else if (newRecord.lessThan(current)) newRecord.type()+" for "+newRecord.order()+" before "+current.type()); current = current.getNext(); tsLogger.logger.trace("RecordList::insert("+this+") : appending "+newRecord.type()+" for "+newRecord.order());
public boolean removeFromList(RecordList rl) { if (rl != null && rl.size() > 0 && rec != null) { boolean forgotten = forgetRec || rec.forgetHeuristic(); boolean removeAllowed = arjPropertyManager.getObjectStoreEnvironmentBean().isIgnoreMBeanHeuristics(); if (forgotten || removeAllowed) { // remove the transaction log for the record if (rl.remove(rec)) { removed = true; return true; } } } return false; } }
public boolean shouldAdd (AbstractRecord a) { if (a.typeIs() == typeIs()) { if (ALLOW_MULTIPLE_LAST_RESOURCES) { if (!_disableMLRWarning || (_disableMLRWarning && !_issuedWarning)) { tsLogger.i18NLogger.warn_lastResource_multipleWarning(a.toString()); _issuedWarning = true; } return true; } else { tsLogger.i18NLogger.warn_lastResource_disallow(this.toString(), a.toString()); return false; } } else { return false; } }
public boolean save_state (OutputObjectState os, int ot) { return super.save_state(os, ot); }
private void addDeferredThrowables(AbstractRecord record, List<Throwable> throwables) { if (record instanceof ExceptionDeferrer) ((ExceptionDeferrer) record).getDeferredThrowables(throwables); else if (record.value() instanceof ExceptionDeferrer) ((ExceptionDeferrer) record.value()).getDeferredThrowables(throwables); }
/** * Cleanup is called if a top-level action is detected to be an orphan. * * NOTE nested actions are never orphans since their parents would be * aborted we may as well abort them as well. * * @return <code>TwoPhaseOutcome</code> as default is the same as * topLevelAbort. */ public int topLevelCleanup () { return topLevelAbort(); }
public boolean forgetHeuristic() { try { if (!isForgotten()) forget(); } catch (org.omg.CORBA.SystemException ignore) { } if (isForgotten() || (rec != null && rec.forgetHeuristic())) return true; return arjPropertyManager.getObjectStoreEnvironmentBean().isIgnoreMBeanHeuristics(); } }
public boolean activate() { if (!activated && rec != null) activated = rec.activate(); return activated; }
public boolean forgetHeuristic() { if (log.isTraceEnabled()) log.tracef("forgetting heuristic for %s", participantURI); try { new TxSupport().httpRequest(new int[] {HttpURLConnection.HTTP_OK, HttpURLConnection.HTTP_NO_CONTENT}, this.participantURI, "DELETE", null); status = TxStatus.TransactionStatusUnknown; } catch (HttpResponseException e) { return false; } return super.forgetHeuristic(); }
ok = recordBeingHandled.topLevelAbort(); else ok = recordBeingHandled.nestedAbort(); && (recordBeingHandled.propagateOnAbort())) merge(recordBeingHandled); updateHeuristic(TwoPhaseOutcome.FINISH_OK, false); // remember updateHeuristic(ok, false); heuristicList.insert(recordBeingHandled); addDeferredThrowables(recordBeingHandled, deferredThrowables); 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()); tsLogger.logger.tracef( "BasicAction::doAbort() result for action-id (%s) on record id: (%s) is (%s) node id: (%s)", get_uid(), record.order(), TwoPhaseOutcome.stringForm(ok), arjPropertyManager.getCoreEnvironmentBean().getNodeIdentifier());
if (newRecord.shouldMerge(current)) tsLogger.logger.trace("RecordList::insert("+this+") : merging "+newRecord.type()+ " and "+current.type()+" for "+newRecord.order()); newRecord.merge(current); replace(newRecord, current); if (newRecord.shouldReplace(current)) tsLogger.logger.trace("RecordList::insert("+this+") : replacing "+current.type()+ " and "+newRecord.type()+" for "+newRecord.order()); if (newRecord.shouldAdd(current)) newRecord.type()+" before "+current.type()+" for "+newRecord.order()); if (newRecord.shouldAlter(current)) newRecord.alter(current); if (newRecord.equals(current)) else if (newRecord.lessThan(current)) newRecord.type()+" for "+newRecord.order()+" before "+current.type()); current = current.getNext(); tsLogger.logger.trace("RecordList::insert("+this+") : appending "+newRecord.type()+" for "+newRecord.order());
public boolean removeFromList(RecordList rl) { if (rl != null && rl.size() > 0 && rec != null) { boolean forgotten = forgetRec || rec.forgetHeuristic(); boolean removeAllowed = arjPropertyManager.getObjectStoreEnvironmentBean().isIgnoreMBeanHeuristics(); if (forgotten || removeAllowed) { // remove the transaction log for the record if (rl.remove(rec)) { removed = true; return true; } } } return false; } }
public boolean shouldAdd (AbstractRecord a) { if (a.typeIs() == typeIs()) { if (ALLOW_MULTIPLE_LAST_RESOURCES) { if (!_disableMLRWarning || (_disableMLRWarning && !_issuedWarning)) { tsLogger.i18NLogger.warn_lastResource_multipleWarning(a.toString()); _issuedWarning = true; } return true; } else { tsLogger.i18NLogger.warn_lastResource_disallow(this.toString(), a.toString()); return false; } } else { return true; } }
public boolean save_state (OutputObjectState os, int ot) { return super.save_state(os, ot); }
private void addDeferredThrowables(AbstractRecord record, List<Throwable> throwables) { if (record instanceof ExceptionDeferrer) ((ExceptionDeferrer) record).getDeferredThrowables(throwables); else if (record.value() instanceof ExceptionDeferrer) ((ExceptionDeferrer) record.value()).getDeferredThrowables(throwables); }
/** * Cleanup is called if a top-level action is detected to be an orphan. * * NOTE nested actions are never orphans since their parents would be * aborted we may as well abort them as well. * * @return <code>TwoPhaseOutcome</code> as default is the same as * topLevelAbort. */ public int topLevelCleanup () { return topLevelAbort(); }