Identify if Java Transaction API available.
If not available, container is not capable of creating a JTA transaction.
if (hasJTA == null) {
// Check for JTA 1.1 API availability.
hasJTA = isClassAvailable("javax.transaction.TransactionManager") &&
isClassAvailable("javax.transaction.TransactionSynchronizationRegistry") ? Boolean.TRUE : Boolean.FALSE;
if (hasJTA && ! TransactionManagerImpl.getInstance().isTransactionManagerAvailable()) {
hasJTA = Boolean.FALSE;
}
}
return hasJTA.booleanValue();