1 Reply Latest reply on Dec 9, 2010 8:18 AM by Leo van den berg

    Before Session Timeout: Flush entityManager problem

    Martin Dames Newbie

      Hi all,


      Im trying to persist/synchronize all user provided data before a session rans out of time within a conversation/pageflow. I need to do this to prevent loosing data and I set the flushMode to manual.


      What would be the way to handle this issue?


      Im using an @Observer(org.jboss.seam.preDestroyContext.SESSION)
      inject the EntityManager, check if it is open() and calling flush() method.
      Then I get the exception javax.persistence.TransactionRequiredException: no transaction is in progress.


      Im using JTA transaction on WebLogic 10.3.3 and JBoss 4.2.3


      So are you dealing with data loss on session time out?


      Thank you!