0 Replies Latest reply on Jun 14, 2007 9:20 AM by Anna Karina

    Is there any reason to hard-code AUTO_CLOSE_SESSION in JBoss

    Anna Karina Newbie


      We are running into the problem that after a transaction is committed, the hibernate session is closed right away. Tracing the problem to the root, we found the in class


      there are these lines:
      settings.setProperty(Environment.FLUSH_BEFORE_COMPLETION, "true");
      settings.setProperty(Environment.AUTO_CLOSE_SESSION, "true");

      Why is it hard-coded to auto-close the session here? Is there a reason to do this? Where can I set this property to false without going to change it in the code?

      I'm using 4.2.0GA. Thanks