0 Replies Latest reply on Jul 12, 2007 7:07 AM by Petr Travas

    LR conversationand unique HibernateSession after exception

    Petr Travas Newbie

      After database exception during flush Hibernate Session should be no
      more used.
      Knowing that I'm searching for a good design for a multipage wizard
      which in the last step persist all my data using Hibernate. I want to be
      sure that in case of an exception thrown because of i.e. overriding
      update etc, I will be able to repeat the last step after presenting user
      with something like "Original attempt was not successful, try again after
      fixing this and that".
      But I have a single managed hibernate session for the whole
      conversation and apparently nested conversations just gets the same
      instance (checked in the debugger). So even creating nested
      conversation I shouldn't try to repeat last step as far as I understand.

      How this should be solved? I think that the problem here is that hibernate
      session is conversation-scoped, I need iteraction with it only on the first
      and (repetitive) last step of my conversation.

      Is invoking converstationHibernateSession.getFactory.getSession() from
      this last conversation-commiting method the only way to be able to retry
      session commit?