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; }
static private void recreate(Xid xid, int timeout) { if (tim != null) { tim.recreate(xid, timeout); } }
/** {@inheritDoc} */ public void registerRecoveryResourceHandler(XAResource xaResource) { transactionManager.registerRecoveryResourceHandler(xaResource); } }
public Transaction getTransaction() throws SystemException { return transactionManager.getTransaction(); }
public int getStatus() throws SystemException { return transactionManager.getStatus(); }
public void rollback() throws IllegalStateException, SecurityException, SystemException { transactionManager.rollback(); }
public Transaction suspend(JavaEETransaction tx) throws SystemException { if ( tx != null ) { if ( !tx.isLocalTx() ) suspendXA(); javaEETM.setCurrentTransaction(null); return tx; } else if (tmLocal.get() != null) { return suspendXA(); // probably a JTS imported tx } return null; }
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { transactionManager.commit(); }
public void begin() throws NotSupportedException, SystemException { transactionManager.begin(); }
public Transaction getTransaction() throws SystemException { return tm.getCurrentTransaction(); }
public void setRollbackOnly() throws IllegalStateException, SystemException { transactionManager.setRollbackOnly(); }
public Transaction suspend(JavaEETransaction tx) throws SystemException { if ( tx != null ) { tm.setCurrentTransaction(null); } return tx; }
public static PhysicalEntityManagerWrapper getExtendedEntityManager(JavaEETransaction transaction, EntityManagerFactory factory) { return (PhysicalEntityManagerWrapper)transaction.getExtendedEntityManagerResource(factory); }
public static PhysicalEntityManagerWrapper getTxEntityManager(JavaEETransaction transaction, EntityManagerFactory factory) { return (PhysicalEntityManagerWrapper) transaction.getTxEntityManagerResource(factory); }
public XATerminator getXATerminator() { return transactionManager.getXATerminator(); }
/** * Check whether the non-xa resource is enlisted in transaction. * * @param tran Transaction * @param resource Resource to be verified * @return boolean indicating whether thegiven non-xa resource is in transaction */ private boolean isNonXAResourceInTransaction(JavaEETransaction tran, ResourceHandle resource) { return resource.equals(tran.getNonXAResource()); }
/** * notifies the resource listeners that recovery has completed */ private void resourceRecoveryCompleted() { Set<RecoveryResourceListener> listeners = recoveryListenersRegistry.getListeners(); for (RecoveryResourceListener rrl : listeners) { rrl.recoveryCompleted(); } }
static private void release(Xid xid) { if (tim != null) { tim.release(xid); } } }
public void setTransactionTimeout(int seconds) throws SystemException { transactionManager.setTransactionTimeout(seconds); }
public void registerSynchronization(Synchronization observer) { try { transactionManager.registerSynchronization(observer); } catch (Exception e) { throw new RuntimeException("Unable to register synchronization " + observer + " for current transaction", e); } }