jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JTA Transaction" Watch "JTA Transaction" New topic

JTA Transaction

Baskar Sikkayan
Ranch Hand

Joined: Oct 06, 2011
Posts: 30
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?

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

I agree. Here's the link: http://aspose.com/file-tools
subject: JTA Transaction
It's not a secret anymore!