users@glassfish.java.net

Re: Cannot catch OptimisticLockException in Bean Managed Transaction

From: <glassfish_at_javadesktop.org>
Date: Tue, 21 Apr 2009 15:53:13 PDT

OptimisticLockException causes transaction to rollback. So the exception that you get is TransactionRolledbackException. You can call em.flush() prior to utx.commit() to get the expected exception.

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

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