_logger.log(Level.FINE,"TM: commit");
validateTransactionManager();
TransactionManager tm = tmLocal.get();
Object obj = tm.getTransaction(); // monitoring object
JavaEETransactionManagerSimplified javaEETMS =
(JavaEETransactionManagerSimplified)javaEETM;
boolean success = false;
if (javaEETMS.isInvocationStackEmpty()) {
try{
tm.commit();
success = true;
}catch(HeuristicMixedException e){
success = true;
throw e;
} finally {
javaEETMS.monitorTxCompleted0(obj, success);
}
} else {
try {
javaEETMS.setTransactionCompeting(true);
tm.commit();
success = true;
/**
} catch (InvocationException ex) {
assert false;
**/
}catch(HeuristicMixedException e){
success = true;
throw e;
} finally {
javaEETMS.monitorTxCompleted0(obj, success);
javaEETMS.setTransactionCompeting(false);
}
}
}