// This is thrown by the underlying transaction but we want to have a RollbackException here so intercept it
if (NucleusLogger.TRANSACTION.isDebugEnabled())
{
NucleusLogger.TRANSACTION.debug(LOCALISER.msg("015020"));
}
throw new RollbackException(LOCALISER.msg("015020"));
}
try
{
ec.getTransaction().commit();
}
catch (NucleusTransactionException nte)
{
Throwable cause = nte.getCause();
PersistenceException pe = null;
if (cause instanceof JDOException)
{
// TODO Do we still need this? Where is JDOException thrown? bytecode enhancement?
pe = NucleusJPAHelper.getJPAExceptionForJDOException((JDOException)cause);
}
else
{
pe = NucleusJPAHelper.getJPAExceptionForNucleusException((NucleusException)cause);
}
throw new RollbackException(LOCALISER.msg("015007"), pe);
}
catch (NucleusException ne)
{
throw NucleusJPAHelper.getJPAExceptionForNucleusException(ne);
}