4 Replies Latest reply on Mar 28, 2014 6:56 AM by Peter Fuhrmann

    Long running conversation does not disconnect from session

    Peter Fuhrmann Newbie

      We are migrating an application from Seam 2.1 to 2.3.1, using JPA2 and JSF 2.1, JDK 7, upgrading Hibernate to 4.1.6, Richfaces to 4.3.3, targeting tomcat 7  (only POJO Seam components). Application runs fine so far, but while monitoring we detected a kind of db connection leak: Long running conversions do not disconnect the Hibernate session from the underlying db connection after finishing a request. Only when the conversation is finished and all components are destroyed, the db connection is returned to the connection pool. (The HibernateSessionImpl.disconnect() or reconnect-Methods are never called, as expected.) I am afraid we have a major configuration problem... Which component should be responsible for disconnecting the session? Can anybody help? Thnx Peter


      Meanwhile I believe that Hibernate is responsible for returning the connection after each transaction, when the correct ConnectionReleaseMode.AFTER_TRANSACTION is set. So I'll take a closer look to my transaction configuration.



           <property name="hibernate.connection.release_mode" value="after_transaction"/>



      solved the problem. May be, the default (on_close)has changed in Hibernate? Or whatever.