/** * TODO NOTE!!! this should be called in an unspecified transaction context, but we cannot enforce this restriction! */ public TransactionManagerImplGBean(int defaultTransactionTimeoutSeconds, XidFactory xidFactory, TransactionLog transactionLog) throws XAException { super(defaultTransactionTimeoutSeconds, xidFactory, transactionLog); // Start the TransactionTimer$CurrentTime thread. This should avoid potential ClassLoader // memory leaks caused by InheritableThreadLocals on the CurrentTime thread. See GERONIMO-4869 for more info. TransactionTimer.getCurrentTime(); }
TransactionImpl(Xid xid, XidFactory xidFactory, TransactionLog txnLog, long transactionTimeoutMilliseconds) throws SystemException { this.xidFactory = xidFactory; this.txnLog = txnLog; this.xid = xid; this.timeout = transactionTimeoutMilliseconds + TransactionTimer.getCurrentTime(); try { txnLog.begin(xid); } catch (LogException e) { status = Status.STATUS_MARKED_ROLLBACK; SystemException ex = new SystemException("Error logging begin; transaction marked for roll back)"); ex.initCause(e); throw ex; } status = Status.STATUS_ACTIVE; }
TransactionImpl(Xid xid, XidFactory xidFactory, TransactionLog txnLog, long transactionTimeoutMilliseconds) throws SystemException { this.xidFactory = xidFactory; this.txnLog = txnLog; this.xid = xid; this.timeout = transactionTimeoutMilliseconds + TransactionTimer.getCurrentTime(); try { txnLog.begin(xid); } catch (LogException e) { status = Status.STATUS_MARKED_ROLLBACK; SystemException ex = new SystemException("Error logging begin; transaction marked for roll back)"); ex.initCause(e); throw ex; } status = Status.STATUS_ACTIVE; }
TransactionImpl(Xid xid, XidFactory xidFactory, TransactionLog txnLog, long transactionTimeoutMilliseconds) throws SystemException { this.xidFactory = xidFactory; this.txnLog = txnLog; this.xid = xid; this.timeout = transactionTimeoutMilliseconds + TransactionTimer.getCurrentTime(); try { txnLog.begin(xid); } catch (LogException e) { status = Status.STATUS_MARKED_ROLLBACK; SystemException ex = new SystemException("Error logging begin; transaction marked for roll back)"); ex.initCause(e); throw ex; } status = Status.STATUS_ACTIVE; }
xaRes.start(branchId, XAResource.TMNOFLAGS); xaRes.setTransactionTimeout((int)(timeout - TransactionTimer.getCurrentTime())/1000); activeXaResources.put(xaRes, addBranchXid(xaRes, branchId)); return true;
TransactionImpl(Xid xid, TransactionManagerImpl txManager, long transactionTimeoutMilliseconds) throws SystemException { this.txManager = txManager; this.xid = xid; this.timeout = transactionTimeoutMilliseconds + TransactionTimer.getCurrentTime(); try { txManager.getTransactionLog().begin(xid); } catch (LogException e) { markRollbackCause(e); status = Status.STATUS_MARKED_ROLLBACK; SystemException ex = new SystemException("Error logging begin; transaction marked for roll back)"); ex.initCause(e); throw ex; } status = Status.STATUS_ACTIVE; }
if (TransactionTimer.getCurrentTime() > timeout) { markRollbackCause(new Exception("Transaction has timed out")); status = Status.STATUS_MARKED_ROLLBACK;
if (TransactionTimer.getCurrentTime() > timeout) { status = Status.STATUS_MARKED_ROLLBACK; timedout = true;
if (TransactionTimer.getCurrentTime() > timeout) { status = Status.STATUS_MARKED_ROLLBACK; timedout = true;
if (TransactionTimer.getCurrentTime() > timeout) { status = Status.STATUS_MARKED_ROLLBACK; timedout = true;