@Override public void setTransactionContext(TransactionContext transactionContext) { transactionContextMap.put(transactionContext.getTxnId(), transactionContext); }
@Override public void setTransactionContext(TransactionContext transactionContext) { transactionContextMap.put(transactionContext.getTxnId(), transactionContext); }
@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(); }
log.trace("Begin transaction: {}", transactionCtx.getTxnId()); transactionCtx.beginTransaction(); queue = transactionCtx.getQueue(endpoint.getConfiguration().getQueueName()); log.trace("Rollback transaction: {}", transactionCtx.getTxnId()); transactionCtx.rollbackTransaction(); log.trace("Commit transaction: {}", transactionCtx.getTxnId()); transactionCtx.commitTransaction(); log.trace("Rollback transaction: {}", transactionCtx.getTxnId()); try { transactionCtx.rollbackTransaction();
tCtx.getTxnId(), key, exchange.getExchangeId()); LOG.warn(msg, throwable); throw new RuntimeException(msg, throwable);
@Override protected Object innerCall() throws Exception { TransactionOptions options = new TransactionOptions(); options.setDurability(parameters.durability); options.setTimeout(parameters.timeout, TimeUnit.MILLISECONDS); options.setTransactionType(TransactionOptions.TransactionType.getByValue(parameters.transactionType)); TransactionManagerServiceImpl transactionManager = (TransactionManagerServiceImpl) clientEngine.getTransactionManagerService(); TransactionContext context = transactionManager.newClientTransactionContext(options, endpoint.getUuid()); context.beginTransaction(); endpoint.setTransactionContext(context); return context.getTxnId(); }
@Override protected Object innerCall() throws Exception { TransactionOptions options = new TransactionOptions(); options.setDurability(parameters.durability); options.setTimeout(parameters.timeout, TimeUnit.MILLISECONDS); options.setTransactionType(TransactionOptions.TransactionType.getByValue(parameters.transactionType)); TransactionManagerServiceImpl transactionManager = (TransactionManagerServiceImpl) clientEngine.getTransactionManagerService(); TransactionContext context = transactionManager.newClientTransactionContext(options, endpoint.getUuid()); context.beginTransaction(); endpoint.setTransactionContext(context); return context.getTxnId(); }