public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException { if (getTransaction() != null) { throw new IllegalStateException("Thread already associated with another transaction"); } if (!(tx instanceof TransactionImpl)) { throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx); } associate((TransactionImpl) tx); }
public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException { if (getTransaction() != null && tx != getTransaction()) { throw new IllegalStateException("Thread already associated with another transaction"); } if (tx != null && tx != getTransaction()) { if (!(tx instanceof TransactionImpl)) { throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx); } associate((TransactionImpl) tx); } }
public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException { if (getTransaction() != null && tx != getTransaction()) { throw new IllegalStateException("Thread already associated with another transaction"); } if (tx != null && tx != getTransaction()) { if (!(tx instanceof TransactionImpl)) { throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx); } associate((TransactionImpl) tx); } }
public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException { if (getTransaction() != null && tx != getTransaction()) { throw new IllegalStateException("Thread already associated with another transaction"); } if (tx != null && tx != getTransaction()) { if (!(tx instanceof TransactionImpl)) { throw new InvalidTransactionException("Cannot resume foreign transaction: " + tx); } associate((TransactionImpl) tx); } }
public Transaction begin(long transactionTimeoutMilliseconds) throws NotSupportedException, SystemException { if (getStatus() != Status.STATUS_NO_TRANSACTION) { throw new NotSupportedException("Nested Transactions are not supported"); } TransactionImpl tx = new TransactionImpl(xidFactory, transactionLog, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds)); // timeoutTimer.schedule(tx, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds)); try { associate(tx); } catch (InvalidTransactionException e) { // should not be possible since we just created that transaction and no one has a reference yet throw (SystemException)new SystemException("Internal error: associate threw an InvalidTransactionException for a newly created transaction").initCause(e); } // Todo: Verify if this is correct thing to do. Use default timeout for next transaction. this.transactionTimeoutMilliseconds.set(null); return tx; }
public Transaction begin(long transactionTimeoutMilliseconds) throws NotSupportedException, SystemException { if (getStatus() != Status.STATUS_NO_TRANSACTION) { throw new NotSupportedException("Nested Transactions are not supported"); } TransactionImpl tx = new TransactionImpl(this, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds)); // timeoutTimer.schedule(tx, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds)); try { associate(tx); } catch (InvalidTransactionException e) { // should not be possible since we just created that transaction and no one has a reference yet throw (SystemException)new SystemException("Internal error: associate threw an InvalidTransactionException for a newly created transaction").initCause(e); } // Todo: Verify if this is correct thing to do. Use default timeout for next transaction. this.transactionTimeoutMilliseconds.set(null); return tx; }
public Transaction begin(long transactionTimeoutMilliseconds) throws NotSupportedException, SystemException { if (getStatus() != Status.STATUS_NO_TRANSACTION) { throw new NotSupportedException("Nested Transactions are not supported"); } TransactionImpl tx = new TransactionImpl(xidFactory, transactionLog, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds)); // timeoutTimer.schedule(tx, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds)); try { associate(tx); } catch (InvalidTransactionException e) { // should not be possible since we just created that transaction and no one has a reference yet throw (SystemException)new SystemException("Internal error: associate threw an InvalidTransactionException for a newly created transaction").initCause(e); } // Todo: Verify if this is correct thing to do. Use default timeout for next transaction. this.transactionTimeoutMilliseconds.set(null); return tx; }
public Transaction begin(long transactionTimeoutMilliseconds) throws NotSupportedException, SystemException { if (getStatus() != Status.STATUS_NO_TRANSACTION) { throw new NotSupportedException("Nested Transactions are not supported"); } TransactionImpl tx = new TransactionImpl(xidFactory, transactionLog, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds)); // timeoutTimer.schedule(tx, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds)); try { associate(tx); } catch (InvalidTransactionException e) { // should not be possible since we just created that transaction and no one has a reference yet throw (SystemException)new SystemException("Internal error: associate threw an InvalidTransactionException for a newly created transaction").initCause(e); } // Todo: Verify if this is correct thing to do. Use default timeout for next transaction. this.transactionTimeoutMilliseconds.set(null); return tx; }