}
/* Make sure the current transaction is active */
txnProxy.getCurrentTransaction();
T threadContext = currentContext.get();
if (threadContext == null) {
throw new TransactionNotActiveException(
"Transaction " + context.getTransaction() +
" is not the current transaction");
} else if (context != threadContext) {
throw new TransactionNotActiveException(
"Wrong transaction: Expected " +
context.getTransaction() + ", found " +
threadContext.getTransaction());
}
}