/** * A helper method for creating an implicit transaction is it is required. * * <p>A transaction may have been passed in or active in the thread local. If not then create one * implicitly to handle the request. */ public void createImplicitTransIfRequired(boolean readOnlyTransaction) { if (transaction == null) { transaction = ebeanServer.getCurrentServerTransaction(); if (transaction == null || !transaction.isActive()) { // create an implicit transaction to execute this query transaction = ebeanServer.createServerTransaction(false, -1); createdTransaction = true; } } }