return jbpmContext;
}
private void joinTransaction() throws SystemException
{
UserTransaction transaction = Transaction.instance();
if ( !transaction.isActiveOrMarkedRollback() )
{
throw new IllegalStateException("JbpmContext may only be used inside a transaction");
}
if ( !synchronizationRegistered && !Lifecycle.isDestroying() && transaction.isActive() )
{
jbpmContext.getSession().isOpen();
try //TODO: what we really want here is if (!cmt)
{
transaction.registerSynchronization(this);
}
catch (UnsupportedOperationException uoe)
{
jbpmContext.getSession().getTransaction().registerSynchronization(this);
}