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