public static boolean isActive(TransactionManager tm) { try { return isActive(tm.getTransaction()); } catch (SystemException error) { throw new RuntimeException(error); } }
public static boolean isActive(TransactionManager tm) { try { return isActive(tm.getTransaction()); } catch (SystemException error) { throw new RuntimeException(error); } }
public static boolean isActive(UserTransaction ut) { try { int status = ut.getStatus(); return isActive(status); } catch (SystemException error) { throw new RuntimeException(error); } }
public static boolean isActive(UserTransaction ut) { try { int status = ut.getStatus(); return isActive(status); } catch (SystemException error) { throw new RuntimeException(error); } }
public static boolean isInTx(TransactionManager transactionManager) { Transaction tx = getTransaction(transactionManager); if (tx == null || !TxUtils.isActive(tx)) return false; return true; }
public static boolean isInTx(TransactionManager transactionManager) { Transaction tx = getTransaction(transactionManager); if (tx == null || !TxUtils.isActive(tx)) return false; return true; }
public static boolean isActive(Transaction tx) { if (tx == null) return false; try { int status = tx.getStatus(); return isActive(status); } catch (SystemException error) { throw new RuntimeException(error); } }
public static boolean isActive(Transaction tx) { if (tx == null) return false; try { int status = tx.getStatus(); return isActive(status); } catch (SystemException error) { throw new RuntimeException(error); } }
private void cleanExtendedPCs() { try { Transaction tx = TxUtil.getTransactionManager().getTransaction(); if (tx != null && TxUtils.isActive(tx)) { tx.registerSynchronization(new XPCCloseSynchronization(this)); } else { closeExtendedPCs(); } } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException("Error cleaning PersistenceContexts in SFSB removal", e); } }
public ConnectionListener getManagedConnection(Subject subject, ConnectionRequestInfo cri) throws ResourceException { Transaction trackByTransaction = null; try { Transaction tx = tm.getTransaction(); if (tx != null && TxUtils.isActive(tx) == false) throw new ResourceException("Transaction is not active: tx=" + tx); if (!interleaving) trackByTransaction = tx; } catch (Throwable t) { JBossResourceException.rethrowAsResourceException("Error checking for a transaction.", t); } if (trace) log.trace("getManagedConnection interleaving=" + interleaving + " tx=" + trackByTransaction); return super.getManagedConnection(trackByTransaction, subject, cri); }
if (cas == null && createIfNotFound && TxUtils.isActive(tx))
if (tx != null && TxUtils.isActive(tx))
if (TxUtils.isActive(tx) == false) tx = null;
public Object invokeHome(Invocation mi) throws Exception { // Invoke through interceptors Object retVal = getNext().invokeHome(mi); // Is the context now with an identity? // This means that a create method was called, so invoke ejbPostCreate. EntityEnterpriseContext ctx = (EntityEnterpriseContext) mi.getEnterpriseContext(); if(ctx != null && ctx.getId() != null) { // copy from the context into the mi // interceptors down the chain look in the mi for the id not the ctx. mi.setId(ctx.getId()); // invoke down the invoke chain // the final interceptor in EntityContainer will redirect this // call to postCreateEntity, which calls ejbPostCreate getNext().invoke(mi); // now it's ready and can be scheduled for the synchronization if(TxUtils.isActive(mi.getTransaction())) { GlobalTxEntityMap.NONE.scheduleSync(mi.getTransaction(), ctx); } } return retVal; }