The Java Transaction API, or JTA, is an API that enables distributed transactions over the Java EE environment. It is most powerful when you delegate the transaction management to the server.
This recipe will show you how to do it!
The Java Transaction API, or JTA, is an API that enables distributed transactions over the Java EE environment. It is most powerful when you delegate the transaction management to the server.
This recipe will show you how to do it!
First, add the dependencies:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.1.Final</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
...