[jboss-as7-dev] Collecting multiple exceptions from a batch operation and handling them...

Scott Marlow smarlow at redhat.com
Mon Apr 25 16:15:41 EDT 2011


I have some JPA container level code that needs to close a set of entity 
managers.  each entity manager close operation could throw an exception. 
  Each thrown exception, could have a series of chained exceptions.

The simplest thing to do, would be to log each exception.  Or to throw 
the first exception and log the remaining ones.  This can only happen 
for non-transactional work (no database updates), so either approach is 
fine.

Are we dealing with this anywhere else?  I can take the same approach 
used elsewhere if so.

Scott



More information about the jboss-as7-dev mailing list