-->
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.  [ 3 posts ] 
Author Message
 Post subject: How can i use JTA with Hibernate?
PostPosted: Thu Dec 04, 2008 7:07 am 
Newbie

Joined: Thu Dec 04, 2008 7:00 am
Posts: 4
Right now I am using Transaction demarcation with plain JDBC, but in term to use Transaction management with JTA what short kind of configuration changed do i need to make?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 10:30 am 
Beginner
Beginner

Joined: Thu Oct 02, 2008 10:15 am
Posts: 21
Short version:
Need to fetch the UserTransaction in code and need following configuration changes.
hibernate.transaction.factory_class
hibernate.transaction.manager_lookup_class
With this hibernate will automatically detect the JTA for your JEE container.

Longer version:
Please follow this link
<url>http://www.hibernate.org/42.html#A5<url>

Let me know if this helps.


Top
 Profile  
 
 Post subject: This fixed my issue
PostPosted: Wed Dec 17, 2008 5:05 pm 
Newbie

Joined: Wed Dec 17, 2008 4:08 pm
Posts: 1
I am using Hibernate 3.2.6 + Spring 2.5.5 + JBoss 4.2.2.GA + envers 1.1.0.GA, and envers was not writing the versioning records once we switched from Spring's HibernateTransactionManager to its JtaTransactionManager (I could see that the envers beforeCompletion() hook was not being called) . Adding
Code:
<prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</prop> 
<prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</prop>
to my Hibernate config fixed the issue.

Thanks, rajiv65!
-Daniel-


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

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.