users@glassfish.java.net

Re: Transaction Rollback not working as expected

From: <glassfish_at_javadesktop.org>
Date: Thu, 12 Apr 2007 08:17:30 PDT

I can verify that the persist committed a row by 1.) looking in the database and 2.) the newly persisted entity loads in my application (missing, of course, the information that caused the exception).

I can also verify that the merge was rolled-back, because when the exception is thrown, the counter is not incremented, and when the exception is not thrown, the counter is incremented. The method called to increment the counter comes before the exception can be thrown, so it should have been incremented.

My understanding is that transactions are assumed to be required unless you supply an annotation to override. Is this correct?

I'll try to make a small test case.
[Message sent by forum member 'bhar99328' (bhar99328)]

http://forums.java.net/jive/thread.jspa?messageID=212114