in tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java [170:198]
private TransactionStatus getStatusFromTransaction() {
int status;
try {
status = currentTransaction.getStatus();
} catch (SystemException e) {
throw new TransactionException("Unable to determine the state of the transaction.", e);
}
switch (status) {
case Status.STATUS_ACTIVE:
return ACTIVE;
case Status.STATUS_MARKED_ROLLBACK:
return MARKED_ROLLBACK;
case Status.STATUS_PREPARING:
return PREPARING;
case Status.STATUS_PREPARED:
return PREPARED;
case Status.STATUS_COMMITTING:
return COMMITTING;
case Status.STATUS_COMMITTED:
return COMMITTED;
case Status.STATUS_ROLLING_BACK:
return ROLLING_BACK;
case Status.STATUS_ROLLEDBACK:
return ROLLED_BACK;
default:
throw new TransactionException("Unable to determine the state of the transaction: " + status);
}
}