Adam Hardy on 14/11/08 11:10, wrote:
I'm trying to work out what is meant to happen to the persistence context for my entity manager when my application throws an exception.

I can't work out any specific details about this from the EJB Persistence spec.

I'm using the extended persistence context with Spring transaction management around my business objects.

It appears that a relational integrity exception causes the transaction to roll back. At this point, do I have to remove or repair the offending entity beans myself? Or is that done automatically?

This is what appears to be happening (automatic) but I wanted to check because I don't see any reference in the spec.


Found it in the spec. Made the mistake of not reading it from cover to cover ;)


Also found an interesting link about the issue:


http://weblogs.java.net/blog/davidvc/archive/2007/04/jpa_and_rollbac.html











Reply via email to