my dog learned polymorphism*
The moose likes Object Relational Mapping and the fly likes JTA Transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JTA Transaction" Watch "JTA Transaction" New topic
Author

JTA Transaction

Baskar Sikkayan
Greenhorn

Joined: Oct 06, 2011
Posts: 16
Hi,
I am using Spring and Hibernate in my project and the Application server is Tomcat.
I am using both Spring DAO(using Hibernate for Storing data into Database) and Spring JDBC(i feel, hibernate is slow while fetching huge results and using Spring JDBC in this case) in my application. Should i use JTA Transaction in this case? Or Can i live with two different transaction Manager?

Thanks,
Baskar.S
ntumba lobo
Ranch Hand

Joined: Oct 21, 2008
Posts: 180
JTA is not appropriate in your case as you work with a single datasource and you just have 2 different data access implementations.
JTA is for when you work with mutilple datasources in a single transaction.

On a side note, this is a bit painful to configure JTA in tomcat, if you need it in the future I would consider using a JEE container (e.g JBoss) which provides JTA out-of-the-box


SCJP 5 , SCWCD 5, SCEA 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTA Transaction