public static boolean getRollbackOnly()
{
Invocation currentInvocation = CurrentInvocation.getCurrentInvocation();
Advisor advisor = currentInvocation.getAdvisor();
// EJB1.1 11.6.1: Must throw IllegalStateException if BMT
TransactionManagementType type = TxUtil.getTransactionManagementType(advisor);
if (type != TransactionManagementType.CONTAINER)
throw new IllegalStateException("Container " + advisor.getName() + ": it is illegal to call getRollbackOnly from BMT: " + type);
// TODO: we should really ask a TxType object to handle getRollbackOnly()
if(getTxType(currentInvocation) == TransactionAttributeType.SUPPORTS)