try
{
ManagedEntityManagerFactory.nonTxStack.push(new IdentityHashMap());
return invocation.invokeNext();
}
finally
{
Map map = ManagedEntityManagerFactory.nonTxStack.pop();
for (Object obj : map.values())
{
try
{
((EntityManager)obj).close();
log.debug("********************* CLOSING tx scoped nontx entity manager");
}
catch (Exception ignored)
{
}
}
}