[jboss-as7-dev] Collecting multiple exceptions from a batch operation and handling them...
Scott Marlow
smarlow at redhat.com
Mon Apr 25 16:25:15 EDT 2011
On 04/25/2011 04:15 PM, Scott Marlow wrote:
> 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.
Well, by fine, I mean. If I should handle this consistently the same
way, as some other layer. I can do it either way. I think the best
approach is to just log the error since it shouldn't lead to a user
level failure (since the database was used in a non-transactional way).
>
> Are we dealing with this anywhere else? I can take the same approach
> used elsewhere if so.
>
> Scott
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
More information about the jboss-as7-dev
mailing list