Atomikos Forum

Integrating Atomikos with Hibernate 3.3.2.GA

According to the integrate with hibernate(without spring) and the discussion at default82df.html?community.6.779.2, it's necessary to set the value of "hibernate.transaction.factory_class" to either " org.hibernate.transaction.JTATransactionFactory
"  or "com.atomikos.icatch.jta.hibernate3.AtomikosJTATransactionFactory", but when i try this, i get the following warning "org.hibernate.ejb.Ejb3Configuration prepareProperties Overriding hibernate.transaction.factory_class is dangerous, this might break the EJB3 specification implementation" during the initialize of hibernate. Moreover, when i open a UserTransaction, do some works and then commit, i also see the following warning "org.hibernate.ejb.AbstractEntityManagerImpl joinTransaction
Cannot join transaction: do not override hibernate.transaction.factory_class".

Then i comment out the "<property name="hibernate.transaction.factory_class" value="com.atomikos.icatch.jta.hibernate3.AtomikosJTATransactionFactory"/>" line in my persistent.xml, run the test again, it's surprising that every run smoothly, hibernate now can join the jta transaction.I make me confused, so I want to know whether or not it's necessary to set the property "hibernate.transaction.factory_class".

Can anyone help me?
nguyen phuc lam Send private email
Wednesday, January 13, 2010
 
 
This might help:

default82df.html?community.6.1085.2#discussTopic1086

we are looking into improving this in a next release.

Until then it is a config problem. If you have a budget for application certification then we can assert officially if your system works fine with the current config.

HTH
Guy Pardon Send private email
Wednesday, January 13, 2010
 
 
Well, it's not only a config problem. If I remove the property then I get

2010-02-09 13:43:08 SessionFactoryImpl [WARN] JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()

I am unable to find a working example of JPA on Hibernate which seems to be one of the most common scenario. This configuration would work fine in a container but not in a unit test as far as I can see. Is it possible to have a consistent configuration for both unit test and web/application containers?
Stephane Nicoll Send private email
Tuesday, February 09, 2010
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics