public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
public int start () { return start(BasicAction.Current()); }
/** * Start the transaction running. * * If the transaction is already running or has terminated, then an error * code will be returned. * * @param timeout the timeout associated with the transaction. If the * transaction is still active when this timeout elapses, the * system will automatically roll it back. * * @return <code>ActionStatus</code> indicating outcome. */ public int begin (int timeout) { int status = super.start(); if (status == ActionStatus.RUNNING) { /* * Now do thread/action tracking. */ ThreadActionData.pushAction(this); _timeout = timeout; if (_timeout == 0) _timeout = TxControl.getDefaultTimeout(); if (_timeout > 0) TransactionReaper.transactionReaper().insert(this, _timeout); } return status; }
/** * Start the transaction running. * * If the transaction is already running or has terminated, then an error * code will be returned. * * @param timeout the timeout associated with the transaction. If the * transaction is still active when this timeout elapses, the * system will automatically roll it back. * * @return <code>ActionStatus</code> indicating outcome. */ public int begin (int timeout) { int status = super.start(); if (status == ActionStatus.RUNNING) { /* * Now do thread/action tracking. */ ThreadActionData.pushAction(this); _timeout = timeout; if (_timeout == 0) _timeout = TxControl.getDefaultTimeout(); if (_timeout > 0) TransactionReaper.transactionReaper().insert(this, _timeout); } return status; }
/** * Start the transaction running. * * If the transaction is already running or has terminated, then an error * code will be returned. * * @param timeout the timeout associated with the transaction. If the * transaction is still active when this timeout elapses, the * system will automatically roll it back. * * @return <code>ActionStatus</code> indicating outcome. */ public int begin (int timeout) { int status = super.start(); if (status == ActionStatus.RUNNING) { /* * Now do thread/action tracking. */ ThreadActionData.pushAction(this); _timeout = timeout; if (_timeout == 0) _timeout = TxControl.getDefaultTimeout(); if (_timeout > 0) TransactionReaper.transactionReaper().insert(this, _timeout); } return status; }
/** * Start the transaction running. * * If the transaction is already running or has terminated, then an error * code will be returned. * * @param timeout the timeout associated with the transaction. If the * transaction is still active when this timeout elapses, the * system will automatically roll it back. * * @return <code>ActionStatus</code> indicating outcome. */ public int begin (int timeout) { int status = super.start(); if (status == ActionStatus.RUNNING) { /* * Now do thread/action tracking. */ ThreadActionData.pushAction(this); _timeout = timeout; if (_timeout == 0) _timeout = TxControl.getDefaultTimeout(); if (_timeout > 0) TransactionReaper.transactionReaper().insert(this, _timeout); } return status; }
/** * Start the transaction running. * * If the transaction is already running or has terminated, then an error * code will be returned. * * @param timeout the timeout associated with the transaction. If the * transaction is still active when this timeout elapses, the * system will automatically roll it back. * * @return <code>ActionStatus</code> indicating outcome. */ public int begin (int timeout) { int status = super.start(); if (status == ActionStatus.RUNNING) { /* * Now do thread/action tracking. */ ThreadActionData.pushAction(this); _timeout = timeout; if (_timeout == 0) _timeout = TxControl.getDefaultTimeout(); if (_timeout > 0) TransactionReaper.transactionReaper().insert(this, _timeout); } return status; }
/** * Start the transaction running. * * If the transaction is already running or has terminated, then an error * code will be returned. * * @param timeout the timeout associated with the transaction. If the * transaction is still active when this timeout elapses, the * system will automatically roll it back. * * @return <code>ActionStatus</code> indicating outcome. */ public int begin (int timeout) { int status = super.start(); if (status == ActionStatus.RUNNING) { /* * Now do thread/action tracking. */ ThreadActionData.pushAction(this); _timeout = timeout; if (_timeout == 0) _timeout = TxControl.getDefaultTimeout(); if (_timeout > 0) TransactionReaper.transactionReaper().insert(this, _timeout); } return status; }
/** * Start the transaction running. * * If the transaction is already running or has terminated, then an error * code will be returned. * * @param timeout the timeout associated with the transaction. If the * transaction is still active when this timeout elapses, the * system will automatically roll it back. * * @return <code>ActionStatus</code> indicating outcome. */ public int begin (int timeout) { int status = super.start(); if (status == ActionStatus.RUNNING) { /* * Now do thread/action tracking. */ ThreadActionData.pushAction(this); _timeout = timeout; if (_timeout == 0) _timeout = TxControl.getDefaultTimeout(); if (_timeout > 0) TransactionReaper.transactionReaper().insert(this, _timeout); } return status; }
@Test public void testJTAActionStatusServiceXAResourceOrphanFilter() { XAResourceOrphanFilter orphanFilter = new JTAActionStatusServiceXAResourceOrphanFilter(); List<String> xaRecoveryNodes = jtaPropertyManager.getJTAEnvironmentBean().getXaRecoveryNodes(); List<String> recoveryNodes = new LinkedList<String>(); recoveryNodes.add("1"); jtaPropertyManager.getJTAEnvironmentBean().setXaRecoveryNodes(recoveryNodes); try { Uid uid = new Uid(); Xid xid = XATxConverter.getXid(uid, false, XATxConverter.FORMAT_ID); assertEquals(XAResourceOrphanFilter.Vote.ROLLBACK, orphanFilter.checkXid(xid)); TwoPhaseCoordinator tpc = new TwoPhaseCoordinator(uid); try { tpc.start(); assertEquals(XAResourceOrphanFilter.Vote.LEAVE_ALONE, orphanFilter.checkXid(xid)); } finally { tpc.cancel(); } assertEquals(XAResourceOrphanFilter.Vote.ROLLBACK, orphanFilter.checkXid(xid)); jtaPropertyManager.getJTAEnvironmentBean().setXaRecoveryNodes(null); TwoPhaseCoordinator tpc2 = new TwoPhaseCoordinator(uid); tpc2.start(); assertEquals(XAResourceOrphanFilter.Vote.ABSTAIN, orphanFilter.checkXid(xid)); tpc2.cancel(); } finally { jtaPropertyManager.getJTAEnvironmentBean().setXaRecoveryNodes(xaRecoveryNodes); } }