How to use JTA support in Tomcat 6 for Hibernate ?

Posted by EugeneP on Stack Overflow See other posts from Stack Overflow or by EugeneP
Published on 2010-03-31T11:55:04Z Indexed on 2010/03/31 13:03 UTC
Read the original article Hit count: 644

Filed under:
|
|
|

They recommend using JTA transaction support in JEE environment.

But how to configure JTA in Tomcat6 so that Hibernate Session could use it ?

Starting with version 3.0.1, Hibernate added the SessionFactory.getCurrentSession() method. Initially, this assumed usage of JTA transactions, where the JTA transaction defined both the scope and context of a current session. Given the maturity of the numerous stand-alone JTA TransactionManager implementations, most, if not all, applications should be using JTA transaction management, whether or not they are deployed into a J2EE container. Based on that, the JTA-based contextual sessions are all you need to use.

© Stack Overflow or respective owner

Related posts about java

Related posts about jta