[jboss-user] [EJB 3.0] - EntityManager.flush() terminated transaction on constraint v

mwoelke do-not-reply at jboss.com
Tue Nov 7 09:54:56 EST 2006


Hi,

We discovered a problem with the flush operation of the entitymanager.
If you try to delete an entity, which is referenced by another, this results in a constraint violation exception at flush or commit time, which is fine. BUT, if you force the entitymanager to flush its statements to the database and one of these statements causes a constraint violation the transaction seems to get terminated. The causing exception is thrown and can be caught but if you do so, you cant react to it by database operations since you dont have an active transaction anymore.

Did anyone else experience this behavior. 
Is that a known bug?
Which JIRA tracking system would be the right one for this problem (hibernate of jboss ejb3).
Why does flush itself handle the exception, why doesnt it simply rethrow it?

Any comments are appreciated.
Regards, Milan Wölke

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983781#3983781

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983781




More information about the jboss-user mailing list