• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTA Transaction

 
Baskar Sikkayan
Ranch Hand
Posts: 31
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic