Class CMTTransactionHandler

java.lang.Object
org.jdbi.v3.core.transaction.NoOpTransactionHandler
org.jdbi.v3.core.transaction.CMTTransactionHandler
All Implemented Interfaces:
TransactionHandler

public class CMTTransactionHandler extends NoOpTransactionHandler
Handler designed to behave properly in a J2EE CMT environment. It will never explicitly begin or commit a transaction, and will throw a runtime exception when rollback is called to force rollback.

Unlike its base class NoOpTransactionHandler, this handler reads the autocommit flag of the connection: when autocommit is disabled, the handle reports an open transaction. Use NoOpTransactionHandler instead when the connection is wrapped by a proxy on which the autocommit flag does not show the real transaction state.

  • Constructor Details

    • CMTTransactionHandler

      public CMTTransactionHandler()
  • Method Details