users@glassfish.java.net

Re: capture "com.mysql.jdbc.exceptions"

From: <glassfish_at_javadesktop.org>
Date: Fri, 11 Jan 2008 15:09:20 PST

Add em.flush() before the return call in the try{} part of the block to force the exception to happen earlier. As the transaction is comitted by the container, on the caller side you can only receive a rollback exception, and there is no requirement for it to contain the clause of the rollback.

Note, that if you start flashing separate changes in the same transaction, you need to choose between knowing the exact cause of the problem and performance drawback.

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

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