0 Replies Latest reply on Feb 17, 2006 9:23 AM by rafael diaz

    how to set AutoCloseSessionEnabled = false, jboss & hibernat

    rafael diaz Newbie

      I´ve upgrade to hibernate 3.1.2 and i´ve found that when i execute any transaction,commit() yhe session is closed automatically.

      I´m working with hibernate mbean and my hibernate-service.xml is this

      <server>
       <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
       <attribute name="DatasourceName">java:/repository</attribute>
       <attribute name="Dialect">org.hibernate.dialect.SQLServerDialect</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
       <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
       <attribute name="ShowSqlEnabled">false</attribute>
       </mbean>
      </server>
      


      i need a property in wich i can tell my application not to close the session every time i make a commit.

      In hibernate exists the property


      hibernate.transaction.auto_close_session


      but i can´t map this property to jboss mbean file..

      Any ideas about this..??

      thanks...