Refine search
public int topLevelPrepare () { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("LastResourceRecord::topLevelPrepare() for " + order()); } if (_lro == null) return TwoPhaseOutcome.PREPARE_NOTOK; switch (_lro.commit()) { case TwoPhaseOutcome.FINISH_OK: return TwoPhaseOutcome.PREPARE_OK; case TwoPhaseOutcome.ONE_PHASE_ERROR: return TwoPhaseOutcome.ONE_PHASE_ERROR; default: return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int nestedCommit () { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("LastResourceRecord::nestedCommit() for " + order()); } return TwoPhaseOutcome.FINISH_ERROR; }
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; } }
protected void init() { // Add resource on phase in current transaction LastResourceRecord lastResourceRecord = new LastResourceRecord(this); BasicAction.Current().add(lastResourceRecord); }
if (a.typeIs() == typeIs())
/** * Not allowed to participate in nested transactions. */ public int nestedPrepare () { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("LastResourceRecord::nestedPrepare() for " + order()); } return TwoPhaseOutcome.PREPARE_NOTOK; }
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; } }
protected void init() { // Add resource on phase in current transaction LastResourceRecord lastResourceRecord = new LastResourceRecord(this); BasicAction.Current().add(lastResourceRecord); }
public int topLevelPrepare () { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("LastResourceRecord::topLevelPrepare() for " + order()); } if (_lro == null) return TwoPhaseOutcome.PREPARE_NOTOK; switch (_lro.commit()) { case TwoPhaseOutcome.FINISH_OK: return TwoPhaseOutcome.PREPARE_OK; case TwoPhaseOutcome.ONE_PHASE_ERROR: return TwoPhaseOutcome.ONE_PHASE_ERROR; default: return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int topLevelCommit () { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("LastResourceRecord::topLevelCommit() for " + order()); } return TwoPhaseOutcome.FINISH_OK; }
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; } }
/** * Attempt to create an AbstractRecord wrapping the given XAResource. Return null if this fails, or * is diallowed by the current configuration of multiple last resource behaviour. * * @param xaRes * @param params * @param xid * @return */ private AbstractRecord createRecord(XAResource xaRes, Object[] params, Xid xid) { final AbstractRecord record; if ((xaRes instanceof LastResourceCommitOptimisation) || ((LAST_RESOURCE_OPTIMISATION_INTERFACE != null) && LAST_RESOURCE_OPTIMISATION_INTERFACE .isInstance(xaRes))) { record = new LastResourceRecord(new XAOnePhaseResource(xaRes, xid, params)); } else { record = new XAResourceRecord(this, xaRes, xid, params); } return record; }
public int topLevelPrepare () { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("LastResourceRecord::topLevelPrepare() for " + order()); } if (_lro == null) return TwoPhaseOutcome.PREPARE_NOTOK; switch (_lro.commit()) { case TwoPhaseOutcome.FINISH_OK: return TwoPhaseOutcome.PREPARE_OK; case TwoPhaseOutcome.ONE_PHASE_ERROR: return TwoPhaseOutcome.ONE_PHASE_ERROR; default: return TwoPhaseOutcome.PREPARE_NOTOK; } }
public int nestedCommit () { if (tsLogger.logger.isTraceEnabled()) { tsLogger.logger.trace("LastResourceRecord::nestedCommit() for " + order()); } return TwoPhaseOutcome.FINISH_ERROR; }
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; } }
/** * Attempt to create an AbstractRecord wrapping the given XAResource. Return null if this fails, or * is diallowed by the current configuration of multiple last resource behaviour. * * @param xaRes * @param params * @param xid * @return */ private AbstractRecord createRecord(XAResource xaRes, Object[] params, Xid xid) { final AbstractRecord record; if ((xaRes instanceof LastResourceCommitOptimisation) || ((LAST_RESOURCE_OPTIMISATION_INTERFACE != null) && LAST_RESOURCE_OPTIMISATION_INTERFACE .isInstance(xaRes))) { record = new LastResourceRecord(new XAOnePhaseResource(xaRes, xid, params)); } else { record = new XAResourceRecord(this, xaRes, xid, params); } return record; }