This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTA Transaction  RSS feed

 
Baskar Sikkayan
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!