@Override public boolean isTransactionActive() { try { final int status = ContextTransactionManager.getInstance().getStatus(); return status == Status.STATUS_ACTIVE || status == Status.STATUS_COMMITTING || status == Status.STATUS_MARKED_ROLLBACK || status == Status.STATUS_PREPARED || status == Status.STATUS_PREPARING || status == Status.STATUS_ROLLING_BACK; } catch (SystemException e) { throw new RuntimeException(e); } }
public int getTransactionStatus() { try { return ContextTransactionManager.getInstance().getStatus(); } catch (SystemException e) { return Status.STATUS_UNKNOWN; } }
public int getStatus() throws SystemException { checkTransactionStateAvailability(); return ContextTransactionManager.getInstance().getStatus(); }
/** * Returns either the loaded entity or the most recent version of the entity that has * been persisted in this transaction. */ private TimerImpl mostRecentEntityVersion(final TimerImpl timerImpl) { try { final int status = ContextTransactionManager.getInstance().getStatus(); if (status == Status.STATUS_UNKNOWN || status == Status.STATUS_NO_TRANSACTION) { return timerImpl; } final String key = timerTransactionKey(timerImpl); TimerImpl existing = (TimerImpl) transactionSynchronizationRegistry.getValue().getResource(key); return existing != null ? existing : timerImpl; } catch (SystemException e) { throw new RuntimeException(e); } }
private void persistTimer(final TimerImpl timer, boolean newTimer) { final Lock lock = getLock(timer.getTimedObjectId()); try { final int status = ContextTransactionManager.getInstance().getStatus(); if (status == Status.STATUS_MARKED_ROLLBACK || status == Status.STATUS_ROLLEDBACK || status == Status.STATUS_ROLLING_BACK) {
public int getTransactionStatus() { try { return ContextTransactionManager.getInstance().getStatus(); } catch (SystemException e) { return Status.STATUS_UNKNOWN; } }
public int getTransactionStatus() { try { return ContextTransactionManager.getInstance().getStatus(); } catch (SystemException e) { return Status.STATUS_UNKNOWN; } }
public int getStatus() throws SystemException { checkTransactionStateAvailability(); return ContextTransactionManager.getInstance().getStatus(); }
public int getStatus() throws SystemException { checkTransactionStateAvailability(); return ContextTransactionManager.getInstance().getStatus(); }