I´m having problems beginning a session at hibernate using JBoss application server.
My MBean is configurated as shown bellow:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.adminguide:name=ProsahSessionFactory">
<attribute name="DatasourceName">java:/PostgresDS</attribute>
<attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>
<attribute name="SessionFactoryName">java:/hibernate/ProsahSessionFactory</attribute>
<attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
<attribute name="ShowSqlEnabled">true</attribute>
</mbean>
</server>
I´m needing to disable the automatic session closing because it´s causing an error at runtime like "session is closed!" when I try to execute a persistente method of a session!
What should I change to disable this automatic session closing? It´s enabled as you can see below:
...
07:56:31,750 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
07:56:31,750 INFO [NamingHelper] JNDI InitialContext properties:{}
07:56:31,765 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
07:56:31,765 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
07:56:31,765 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
07:56:31,765 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
07:56:31,765 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
07:56:31,765 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
07:56:31,765 INFO [SettingsFactory] JDBC batch size: 15
...
thanks