if (cache.hasDefined(TransactionResourceDefinition.PATH.getKey())) {
ModelNode transaction = cache.get(TransactionResourceDefinition.PATH.getKeyValuePair());
if (transaction.isDefined()) {
long stopTimeout = TransactionResourceDefinition.STOP_TIMEOUT.resolveModelAttribute(context, transaction).asLong();
TransactionMode txMode = TransactionMode.valueOf(TransactionResourceDefinition.MODE.resolveModelAttribute(context, transaction).asString());
LockingMode lockingMode = LockingMode.valueOf(TransactionResourceDefinition.LOCKING.resolveModelAttribute(context, transaction).asString());
boolean transactional = (txMode != TransactionMode.NONE);
boolean batching = (txMode == TransactionMode.BATCH);
boolean useSynchronization = (txMode == TransactionMode.NON_XA);
boolean recoveryEnabled = (txMode == TransactionMode.FULL_XA);