ManagedConnection.CompletionListener (Apache Tomcat 9.0.111 API Documentation)
Description: declaration: package: org.apache.tomcat.dbcp.dbcp2.managed, class: ManagedConnection, class: CompletionListener

# Class ManagedConnection.CompletionListener

java.lang.Object
org.apache.tomcat.dbcp.dbcp2.managed.ManagedConnection.CompletionListener

All Implemented Interfaces:
  `TransactionContextListener`

Enclosing class:
  `ManagedConnection<C extends Connection>`

protected class ManagedConnection.CompletionListener extends Object implements TransactionContextListener
Delegates to `ManagedConnection.transactionComplete()` for transaction completion events.

Since:
  2.0

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `CompletionListener()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `afterCompletion(TransactionContext completedContext, boolean committed)`
  Called after a transaction commits or rolls back.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### CompletionListener

    protected CompletionListener()

- ## Method Details

  - ### afterCompletion

    public void afterCompletion(TransactionContext completedContext, boolean committed)
    Description copied from interface: `TransactionContextListener`
    Called after a transaction commits or rolls back.
    Specified by:
      `afterCompletion` in interface `TransactionContextListener`
    Parameters:
      `completedContext` - the transaction context that completed.
      `committed` - true if the transaction committed; false otherwise.