public void begin()
{
checkTransactionJoin();
if (joinStatus != JoinStatus.NO_TXN)
{
throw new NucleusTransactionException("JTA Transaction is already active");
}
UserTransaction utx;
try
{
utx = getUserTransaction();
}
catch (NamingException e)
{
throw om.getApiAdapter().getExceptionForException("Failed to obtain UserTransaction", e);
}
try
{
utx.begin();
}
catch (NotSupportedException e)
{
throw om.getApiAdapter().getExceptionForException("Failed to begin UserTransaction", e);
}
catch (SystemException e)
{
throw om.getApiAdapter().getExceptionForException("Failed to begin UserTransaction", e);
}
checkTransactionJoin();
if (joinStatus != JoinStatus.JOINED)
{
throw new NucleusTransactionException("Cannot join an auto started UserTransaction");
}
userTransaction = utx;
}