JTA

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

To do so register JtaTransactionManager as the external transaction manager on the builder:

Database database = Database.builder()
  .loadFromProperties()
  .externalTransactionManager(new JtaTransactionManager())
  .build();