Reputation: 381
What is the main objective to use JTA in a web application with Hibernate and Spring ?
Upvotes: 0
Views: 709
Reputation: 692211
The main one would be to have support for distributed transactions. For example, you might want to write to the database and send a JMS message, and have both part of the same transaction. Or to modify two different databases.
Another reason might be that you already run your app inside a Java EE container, providing support for JTA, and want to benefit from the container services (diagnostics, statistics, etc.).
Upvotes: 2