standardTransaction = (StandardTransaction) wireContext.get(standardTransactionName);
} else {
standardTransaction = wireContext.get(StandardTransaction.class);
}
if (standardTransaction==null) {
throw new WireException("couldn't find standard-transaction "+(standardTransactionName!=null ? "'"+standardTransactionName+"'" : "by type ")+"to enlist the hibernate transaction");
}
// enlist the hibernate transaction to the global transaction
HibernateTransactionResource resource = new HibernateTransactionResource(hibernateTransaction, session);
standardTransaction.enlistResource(resource);