/**
  * Creates and returns a new inactive transaction. Returned transaction is bound to the current
  * execution thread.
  *
  * <p>If there is a TransactionDelegate, adds the delegate to the newly created Transaction.
  * Behavior of the returned Transaction depends on "usingInternalTransactions" property setting.
  *
  * @since 1.1
  */
 public Transaction createTransaction() {
   if (isUsingExternalTransactions()) {
     Transaction transaction = Transaction.externalTransaction(getTransactionDelegate());
     transaction.setJdbcEventLogger(jdbcEventLogger);
     return transaction;
   } else {
     Transaction transaction = Transaction.internalTransaction(getTransactionDelegate());
     transaction.setJdbcEventLogger(jdbcEventLogger);
     return transaction;
   }
 }