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