Hi everyone,
in page 50 of HibernateInAction book we can find the following sentence:
" * net.sf.hibernate.transaction.JTATransactionFactory delegates to JTA.
This is the correct strategy for CMT, where connections are enlisted with JTA"
EJB specification indicates that if CMT EJB beans try to instantiate the
UserTransaction, an exception should be thrown.
We are using WebSphere Application Server 5.1, and the following lines are in our hibernate-cfg.xml:
<property name="hibernate.transaction.factory_class">
net.sf.hibernate.transaction.JTATransactionFactory
</property>
<property name="hibernate.transaction.manager_lookup_class">
net.sf.hibernate.transaction.WebSphereTransactionManagerLookup
</property>
<property name="jta.UserTransaction">
java:comp/UserTransaction
</property>
When hibernate JTA tries to begin the transaction, an exception is thrown:
"net.sf.hibernate.TransactionException: Could not find UserTransaction in JNDI:"
We have seen in the forum entries that people using CMT also use the hibernate JTATransaction, but
they don't have this problem.
So, summarizing, can someone explain us why HibernateInAction indicates to use JTA with CMT?
Thanks in advance,
Angel Luna
Hibernate version:2.1.6
|