@Override protected Object call() throws Exception { String transactionId = parameters.transactionId; TransactionContext transactionContext = endpoint.getTransactionContext(transactionId); if (transactionContext == null) { throw new TransactionException("No transaction context with given transactionId: " + transactionId); } Transaction transaction = TransactionAccessor.getTransaction(transactionContext); transaction.prepare(); return null; }
@Override protected Object call() throws Exception { String transactionId = parameters.transactionId; TransactionContext transactionContext = endpoint.getTransactionContext(transactionId); if (transactionContext == null) { throw new TransactionException("No transaction context with given transactionId: " + transactionId); } Transaction transaction = TransactionAccessor.getTransaction(transactionContext); transaction.prepare(); return null; }
@Override protected Object call() throws Exception { String transactionId = parameters.transactionId; TransactionContext transactionContext = endpoint.getTransactionContext(transactionId); if (transactionContext == null) { throw new TransactionException("No transaction context with given transactionId: " + transactionId); } Transaction transaction = TransactionAccessor.getTransaction(transactionContext); transaction.rollback(); endpoint.removeTransactionContext(transactionId); return null; }
@Override protected Object call() throws Exception { String transactionId = parameters.transactionId; TransactionContext transactionContext = endpoint.getTransactionContext(transactionId); if (transactionContext == null) { throw new TransactionException("No transaction context with given transactionId: " + transactionId); } Transaction transaction = TransactionAccessor.getTransaction(transactionContext); transaction.rollback(); endpoint.removeTransactionContext(transactionId); return null; }
@Override protected Object call() throws Exception { String transactionId = parameters.transactionId; TransactionContext transactionContext = endpoint.getTransactionContext(transactionId); if (transactionContext == null) { throw new TransactionException("No transaction context with given transactionId: " + transactionId); } Transaction transaction = TransactionAccessor.getTransaction(transactionContext); if (parameters.onePhase) { transaction.prepare(); } transaction.commit(); endpoint.removeTransactionContext(transactionId); return null; }
@Override protected Object call() throws Exception { String transactionId = parameters.transactionId; TransactionContext transactionContext = endpoint.getTransactionContext(transactionId); if (transactionContext == null) { throw new TransactionException("No transaction context with given transactionId: " + transactionId); } Transaction transaction = TransactionAccessor.getTransaction(transactionContext); if (parameters.onePhase) { transaction.prepare(); } transaction.commit(); endpoint.removeTransactionContext(transactionId); return null; }
@Override protected Object call() throws Exception { XAService xaService = getService(getServiceName()); String ownerUuid = endpoint.getUuid(); TransactionContext context = xaService.newXATransactionContext(parameters.xid, ownerUuid, (int) parameters.timeout, true); TransactionAccessor.getTransaction(context).begin(); endpoint.setTransactionContext(context); return context.getTxnId(); }
@Override protected Object call() throws Exception { XAService xaService = getService(getServiceName()); String ownerUuid = endpoint.getUuid(); TransactionContext context = xaService.newXATransactionContext(parameters.xid, ownerUuid, (int) parameters.timeout, true); TransactionAccessor.getTransaction(context).begin(); endpoint.setTransactionContext(context); return context.getTxnId(); }