4 Replies Latest reply on Jul 4, 2006 5:15 AM by Stefaan Desoete

    How to disable Hibernate's Auto session close?

    Alejandro Dominguez Newbie

      Good day to all,
      I have some problems with Hibernate; the point is that Hibernate auto closes the session after commiting a transaction. I do not want this behavior as I have a filter that automatically does it.
      Searching the web I found the entry line for the hibernate.properties file, but I'm using a .har and a jboss-service.xml to deploy.

      How should the line in the jboss-service.xml look like in order to disable the auto close session after transaction?

      Currently my file looks like:

      <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=tu-persistence">
       <attribute name="DatasourceName">java:/CacheDS</attribute>
       <attribute name="Dialect">com.tu.hibernate.CacheDialect</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/SessionFactory/tu-persistence</attribute>
       <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
       <attribute name="ShowSqlEnabled">true</attribute>
      </mbean>
      


      Bets regards

      domyalex