Hi,
I would like to use JTA with Jonas Application Server user so I try to configure hibernate with the right lookup class but the JTA transaction is not found.
When I try with :
JOnASTransactionManagerLookup, the exception is the following one :
Code:
2005-08-30 18:47:21,856 : JFactory.postInvoke : system exception in business method:
org.hibernate.HibernateException: Could not obtain JOnAS transaction manager instance at org.hibernate.transaction.JOnASTransactionManagerLookup.getTransactio
nManager(JOnASTransactionManagerLookup.java:24)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:
270)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1005)
When I try with :
JOTMTransactionManagerLookup, the exception is the following one :
Code:
2005-08-30 18:18:05,448 : SessionFactoryImpl.checkNamedQueries : Checking 0 named queries
org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactor
yImpl.java:510)
I think Jonas uses JOTM to manage transaction...
Somebody knows what is wrong in my configuration ?
Code:
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">jdbc_1</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JOnASTransactionManagerLookup</property>
<property name="hibernate.session_factory_name">foo:/hibernate/SessionFactory</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.hbm2ddl.auto">create</property>
<mapping resource="Client.hbm.xml"/>
<mapping resource="Cpt.hbm.xml"/>
<mapping resource="Adr.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Thanks