[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Hibernate and JBOSS JTA failed transactions
ggreaves
do-not-reply at jboss.com
Wed Sep 27 17:13:35 EDT 2006
Could you be more specific as to what you did to solve this. I am using a local-tx connection and still having the:
SessionException: Session was already closed
when I try to manually close the session. BTW, this is specific behaviour to version 4.0.4. In 4.0.3, with the same connection and hibernate-service.xml, it works fine.
Here are the files in question:
=========== hibernate-service.xml ==========
<server>
| <mbean code="org.jboss.hibernate.jmx.Hibernate"
| name="jboss.har:service=Hibernate">
| <attribute name="DatasourceName">java:/CRMDS</attribute>
| <attribute name="Dialect">org.hibernate.dialect.MySQLDialect</attribute>
| <attribute name="SessionFactoryName">java:/hibernate/HibernateSessionFactory</attribute>
| <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
| <attribute name="Hbm2ddlAuto">update</attribute>
| <attribute name="ShowSqlEnabled">true</attribute>
| </mbean>
| </server>
=========== hibernate-service.xml ==========
=========== datasource ===============
<datasources>
| <local-tx-datasource>
| <jndi-name>CRMDS</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/crmdb</connection-url>
| <driver-class>org.gjt.mm.mysql.Driver</driver-class>
| <user-name>blah</user-name>
| <password>blah</password>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <!-- sql to call when connection is created
| <new-connection-sql>some arbitrary sql</new-connection-sql>
| -->
| <!-- sql to call on an existing pooled connection when it is obtained from pool
| <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
| -->
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
=========== datasource ===============
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974687#3974687
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974687
More information about the jboss-user
mailing list