public Transaction getTransaction() throws SystemException { return tm.getCurrentTransaction(); }
public int getStatus() throws SystemException { JavaEETransaction tx = javaEETM.getCurrentTransaction(); int status = javax.transaction.Status.STATUS_NO_TRANSACTION; TransactionManager tm = tmLocal.get(); if ( tx != null) status = tx.getStatus(); else if (tm != null) status = tm.getStatus(); if (_logger.isLoggable(Level.FINE)) _logger.log(Level.FINE,"TM: status: " + JavaEETransactionManagerSimplified.getStatusAsString(status)); return status; }
public int getStatus() throws SystemException { JavaEETransaction tx = tm.getCurrentTransaction(); if ( tx != null && tx.isLocalTx()) return tx.getStatus(); else return javax.transaction.Status.STATUS_NO_TRANSACTION; }
public Transaction getTransaction() throws SystemException { JavaEETransaction tx = javaEETM.getCurrentTransaction(); if (_logger.isLoggable(Level.FINE)) _logger.log(Level.FINE,"TM: getTransaction: tx=" + tx + ", tm=" + tmLocal.get()); if ( tx != null ) return tx; // Check for a JTS imported tx TransactionInternal jtsTx = null; TransactionManager tm = tmLocal.get(); if (tm != null) { jtsTx = (TransactionInternal)tm.getTransaction(); } if ( jtsTx == null ) return null; else { // check if this JTS Transaction was previously active // in this JVM (possible for distributed loopbacks). tx = (JavaEETransaction)globalTransactions.get(jtsTx); if (_logger.isLoggable(Level.FINE)) _logger.log(Level.FINE,"TM: getTransaction: tx=" + tx + ", jtsTx=" + jtsTx); if ( tx == null ) { tx = ((JavaEETransactionManagerSimplified)javaEETM).createImportedTransaction(jtsTx); globalTransactions.put(jtsTx, tx); } javaEETM.setCurrentTransaction(tx); // associate tx with thread return tx; } }
Transaction transaction = transactionManager.getCurrentTransaction(); if (transaction != null) { try {