-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: JTA and CMT doubt
PostPosted: Fri Oct 22, 2004 7:19 am 
Newbie

Joined: Fri Oct 22, 2004 4:27 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.