if (ctx.isTxSynchronized()) return;
Transaction tx = tm.getTransaction();
if (tx == null) return;
if (tx.getStatus() == Status.STATUS_MARKED_ROLLBACK) return;
SFSBSessionSynchronization synch = new SFSBSessionSynchronization(ctx);
SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
try
{
bean.afterBegin();
}
catch (EJBException e)
{
throw e;
}
catch (RemoteException e)
{
throw new EJBException(e);
}
try
{
tx.registerSynchronization(synch);
}
catch (RollbackException ignore)
{
}