Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 1.65 KB

File metadata and controls

55 lines (42 loc) · 1.65 KB

Javax transaction quickstart

Overview

This example shows how to obtain a Java EE conforming transaction and how to invoke various methods of the javax.transaction.Transaction interface such as starting and ending transactions, examining transacton status, timeouts etc.

Usage

mvn compile exec:exec

or

./run.[sh|bat]

Expected output

[INFO] BUILD SUCCESS

otherwise you can examine what went wrong by enabling stack traces with the -e flat:
	mvn compile exec:exec -e

What just happened

The example looks up an instance of the Java EE UserTransaction using and calls its various methods. If anything goes wrong an exception is generated. The example shows how to get the instance of the TransactionManager interface.