hi,
I am currently trying to get Hibernate (3.3.2 GA) to work with JTA and JOTM.
My hibernate.cfg looks like this:
Code:
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/----</property>
<property name="hibernate.connection.username">----</property>
<property name="hibernate.connection.password">----</property>
<property name="hibernate.current_session_context_class">jta</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JOTMTransactionManagerLookup</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
To get a Session I use this code:
Code:
sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
sessionFactory.getCurrentSession();
but i get this exception:
Code:
java.lang.RuntimeException: No TransactionManagerLookup specified
Strangely there is no error message in the hibernate log file:
Code:
17:43:14:198 - DEBUG - SessionFactoryImpl - obtaining JTA TransactionManager
17:43:14:234 - DEBUG - SessionFactoryImpl - Checking 0 named HQL queries
17:43:14:235 - DEBUG - SessionFactoryImpl - Checking 0 named SQL queries