{
ObjectManager om = pm.getObjectManager();
if (om.getTransaction().isActive())
{
// Note: we replicate the exception that would have come from pm.close() when tx active
TransactionActiveOnCloseException tae = new TransactionActiveOnCloseException(om);
exceptions.add(new JDOUserException(tae.getMessage(), pm));
}
}
if (!exceptions.isEmpty())
{
throw new JDOUserException(LOCALISER.msg("012002"), exceptions.toArray(new Throwable[exceptions.size()]));