DefaultTransactionFactory (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.tx, class: DefaultTransactionFactory

# Class DefaultTransactionFactory

java.lang.Object
org.apache.cayenne.tx.DefaultTransactionFactory

All Implemented Interfaces:
  `TransactionFactory`

public class DefaultTransactionFactory extends Object implements TransactionFactory

Since:
  4.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `externalTransactions`
  `protected JdbcEventLogger`
  `jdbcEventLogger`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultTransactionFactory(RuntimeProperties properties, JdbcEventLogger jdbcEventLogger)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Transaction`
  `createTransaction()`
  `Transaction`
  `createTransaction(TransactionDescriptor descriptor)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### externalTransactions

    protected boolean externalTransactions

  - ### jdbcEventLogger

    protected JdbcEventLogger jdbcEventLogger

- ## Constructor Details

  - ### DefaultTransactionFactory

    public DefaultTransactionFactory(RuntimeProperties properties, JdbcEventLogger jdbcEventLogger)

- ## Method Details

  - ### createTransaction

    public Transaction createTransaction()
    Specified by:
      `createTransaction` in interface `TransactionFactory`

  - ### createTransaction

    public Transaction createTransaction(TransactionDescriptor descriptor)
    Specified by:
      `createTransaction` in interface `TransactionFactory`
    Parameters:
      `descriptor` - with required transaction properties
    Returns:
      new transaction
    Since:
      4.1