1 Reply Latest reply on Feb 1, 2007 2:11 PM by Fernando Montaño

    Recovering from OptimisticLockException

    Chris Baxter Newbie

      Is there any way to continue to use the EntityManager after encountering an OptimisticLockException? I'm flushing the EntityManager explicitly in my session bean within a try/catch block where I'm catching OptimisticLockException. In that catch block, I wanted to make one last read using the EntityManager but it complains that the transaction is no longer active. If I'm explicitly checking for and catching/handling the exception, shouldn't I be able to continue using the EntityManager? Is there any way to get this to work?