AlphaResponse preIntercept(int timeout) { try { return sender .send(new SagaStartedEvent(omegaContext.globalTxId(), omegaContext.localTxId(), timeout)); } catch (OmegaException e) { throw new TransactionalException(e.getMessage(), e.getCause()); } }
public AlphaResponse preIntercept(String parentTxId, String methodName, int timeout) { try { return tccMessageSender.tccTransactionStart(new TccStartedEvent(omegaContext.globalTxId(), omegaContext.localTxId())); } catch (OmegaException e) { throw new TransactionalException(e.getMessage(), e.getCause()); } }
@Override protected State start() { try { if (transactionManager.getTransaction() != null) { throw new TransactionalException("@Transactional(NEVER) but a transaction is running", new IllegalStateException()); } return STATE; } catch (final SystemException e) { throw new TransactionalException(e.getMessage(), e); } }
@Override protected void commit(final State state) { if (state.old != null) { try { transactionManager.resume(state.old); } catch (final InvalidTransactionException | SystemException e) { throw new TransactionalException(e.getMessage(), e); } } }
@Override protected State start() { try { final Transaction transaction = transactionManager.suspend(); transactionManager.begin(); return new State(transaction, transactionManager.getTransaction()); } catch (final SystemException | NotSupportedException se) { throw new TransactionalException(se.getMessage(), se); } }
@Override protected State start() { final Transaction transaction; try { transaction = transactionManager.getTransaction(); } catch (final SystemException e) { throw new TransactionalException(e.getMessage(), e); } return new State(transaction, transaction); }
@Override protected State start() { try { final Transaction transaction = transactionManager.getTransaction(); return new State(transaction, transaction); } catch (final SystemException e) { throw new TransactionalException(e.getMessage(), e); } }
@Override protected State start() { try { final Transaction tx = transactionManager.getTransaction(); return new State(tx, null); } catch (final SystemException e) { throw new TransactionalException(e.getMessage(), e); } }
@AroundInvoke public Object intercept(final InvocationContext ic) throws Exception { try { return super.intercept(ic); } catch (final RemoteException re) { throw new TransactionalException(re.getMessage(), new InvalidTransactionException(re.getMessage())); } }
@Override protected Object doIntercept(TransactionManager tm, Transaction tx, InvocationContext ic) throws Exception { if (tx == null) { throw new TransactionalException(jtaLogger.i18NLogger.get_tx_required(), new TransactionRequiredException()); } return invokeInCallerTx(ic, tx); } }
@Override protected Object doIntercept(TransactionManager tm, Transaction tx, InvocationContext ic) throws Exception { if (tx == null) { throw new TransactionalException(jtaLogger.i18NLogger.get_tx_required(), new TransactionRequiredException()); } return invokeInCallerTx(ic, tx); } }
@Override protected Object doIntercept(TransactionManager tm, Transaction tx, InvocationContext ic) throws Exception { if (tx != null) { throw new TransactionalException(jtaLogger.i18NLogger.get_tx_required(), new InvalidTransactionException()); } return invokeInNoTx(ic); } }
@Override protected Object doIntercept(TransactionManager tm, Transaction tx, InvocationContext ic) throws Exception { if (tx == null) { throw new TransactionalException(jtaLogger.i18NLogger.get_tx_required(), new TransactionRequiredException()); } return invokeInCallerTx(ic, tx); } }
@Override protected Object doIntercept(TransactionManager tm, Transaction tx, InvocationContext ic) throws Exception { if (tx == null) { throw new TransactionalException(jtaLogger.i18NLogger.get_tx_required(), new TransactionRequiredException()); } return invokeInCallerTx(ic, tx); } }
@Override protected Object doIntercept(TransactionManager tm, Transaction tx, InvocationContext ic) throws Exception { if (tx != null) { throw new TransactionalException(jtaLogger.i18NLogger.get_tx_required(), new InvalidTransactionException()); } return invokeInNoTx(ic); } }
@Override protected Object doIntercept(TransactionManager tm, Transaction tx, InvocationContext ic) throws Exception { if (tx != null) { throw new TransactionalException(jtaLogger.i18NLogger.get_tx_required(), new InvalidTransactionException()); } return invokeInNoTx(ic); } }
@Override protected Object doIntercept(TransactionManager tm, Transaction tx, InvocationContext ic) throws Exception { if (tx != null) { throw new TransactionalException(jtaLogger.i18NLogger.get_tx_required(), new InvalidTransactionException()); } return invokeInNoTx(ic); } }
AlphaResponse preIntercept(int timeout) { try { return sender .send(new SagaStartedEvent(omegaContext.globalTxId(), omegaContext.localTxId(), timeout)); } catch (OmegaException e) { throw new TransactionalException(e.getMessage(), e.getCause()); } }
@Override public AlphaResponse preIntercept(String parentTxId, String compensationMethod, int timeout, String retriesMethod, int retries, Object... message) { try { return sender.send(new SagaStartedEvent(omegaContext.globalTxId(), omegaContext.localTxId(), timeout)); } catch (OmegaException e) { throw new TransactionalException(e.getMessage(), e.getCause()); } }
public AlphaResponse preIntercept(String parentTxId, String methodName, int timeout) { try { return tccMessageSender.tccTransactionStart(new TccStartedEvent(omegaContext.globalTxId(), omegaContext.localTxId())); } catch (OmegaException e) { throw new TransactionalException(e.getMessage(), e.getCause()); } }