Interface DatabaseTransaction

  • public interface DatabaseTransaction
    Defines an interface for synchronous queries to interact with a explicit transaction.

    To store this transaction in CMP, call marshal() and store the result. To retrieve the transaction object call DatabaseQueryProvider.unmarshalTransaction(byte[]) passing in the marshaled handle.

    • Method Detail

      • setTransactionIsolation

        void setTransactionIsolation​(int level)
        Set a transaction isolation level. The given level will be passed to Connection.setTransactionIsolation(int) when a connection is first retrieved for this transaction. The constants defined in the interface Connection are the possible transaction isolation levels.

        level - one of the following Connection constants: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE. (Note that Connection.TRANSACTION_NONE cannot be used because it specifies that transactions are not supported.)