Also, for more important cases, we could throw a flattened chain of
exceptions. Where is each top level exception, is followed by its
children exceptions.
The more I think about the below case, the more convinced I am that the
exceptions should at best be logged. If not ignored (since its
non-transactional).
On 04/25/2011 04:25 PM, Scott Marlow wrote:
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(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev