users@glassfish.java.net

Re: Frustrating and Confusing Exceptions

From: <glassfish_at_javadesktop.org>
Date: Wed, 28 Jan 2009 14:38:52 PST

May be there is a bug in GlassFish if you mark PersistenceException as an ApplicationException and it's still wrapped up into an EJBException. Without the ApplicationException designation, PersistenceException is a RuntimeException and is not propagated up the stack to the client.

em.flush() will report an exception for a specific change. Another option is to use UserTransaction so that you can catch the exact exception thrown at commit, but it can combine more than one failure or report the 1st one.

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

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