in tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java [79:101]
public TransactionContextImpl(RecoveryWorkAroundTransactionManager transactionManager,
boolean readOnly, LocalResourceSupport localResourceSupport) {
this.transactionManager = transactionManager;
this.readOnly = readOnly;
this.localResourceSupport = localResourceSupport;
Transaction tmp = null;
try {
tmp = transactionManager.suspend();
transactionManager.begin();
} catch (Exception e) {
if(tmp != null) {
try {
transactionManager.resume(tmp);
} catch (Exception e1) {
e.addSuppressed(e1);
}
}
throw new TransactionException("There was a serious error creating a transaction");
}
oldTran = tmp;
currentTransaction = transactionManager.getTransaction();
key = transactionManager.getTransactionKey();
}