users@glassfish.java.net

Re: catching transaction rollback exceptions on container managed beans

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Sep 2008 13:29:15 PDT

If you are using JPA inside createAccoun(), call em.flush(). Otherwise (if this method starts and finishes tx) you can only deal with the results in the caller. Keep in mind though that if em.flush() throws an exception, the transaction will be marked already for rollback by the spec requirements.

Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

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