JTA

When using Ebean in a JEE container we can specify to use the JTA transactions managed by the container.

To do so set JtaTransactionManager as an external transaction by:

DatabaseConfig config = new DatabaseConfig();

// set JtaTransactionManager as the external transaction manager
config.setExternalTransactionManager(new JtaTransactionManager());