Class TransactionDescriptor

java.lang.Object
org.apache.cayenne.tx.TransactionDescriptor
Direct Known Subclasses:
DefaultTransactionDescriptor

public class TransactionDescriptor extends Object
Descriptor that allows to customize transaction logic. It provides following options:
  • transaction isolation level
  • transaction propagation logic.
  • custom connection to use in a transaction
Since:
4.1
See Also:
  • Field Details

    • ISOLATION_DEFAULT

      public static final int ISOLATION_DEFAULT
      Keep database default isolation level
      See Also:
  • Constructor Details

    • TransactionDescriptor

      @Deprecated public TransactionDescriptor(int isolation, TransactionPropagation propagation)
      Deprecated.
      since 4.2. Use builder() method instead.
      Parameters:
      isolation - one of the following Connection constants: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, Connection.TRANSACTION_SERIALIZABLE, or TransactionDescriptor.ISOLATION_DEFAULT
      propagation - transaction propagation behaviour
      See Also:
    • TransactionDescriptor

      @Deprecated public TransactionDescriptor(int isolation)
      Deprecated.
      since 4.2. Use builder() method instead.
      Create transaction descriptor with desired isolation level and NESTED propagation
      Parameters:
      isolation - one of the following Connection constants: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, Connection.TRANSACTION_SERIALIZABLE, or TransactionDescriptor.ISOLATION_DEFAULT
    • TransactionDescriptor

      @Deprecated public TransactionDescriptor(TransactionPropagation propagation)
      Deprecated.
      since 4.2. Use builder() method instead.
      Parameters:
      propagation - transaction propagation behaviour
      See Also:
  • Method Details