1 Reply Latest reply on Nov 25, 2008 3:35 PM by S Hirve

    Database Exception kills Extended Conversation

    S Hirve Newbie
      I want to catch and handle the OptimisticLockException returned by Hibernate when I flush a transaction.  This is being done within an extended conversation managed through a jpdl pageflow.  On this exception, I try to
        - explicitly rollback the DB transaction,
        - clear() the Persistence context
        - begin a new DB transaction in the same Persistence context
        - reload the entities

         However, Seam kills the extended conversation, ie, closes the Hibernate EntityManager/Session/Persitence context at the end of the Request.  Is there any way I can coax Seam to leave the conversation intact?
      If OptimisticLockException had been an applicationexception, I suppose I could have annotated it with @ApplicationException(end=false) ?
      My Seam version is 2.1.0
      Thanks for any tips or help