Interface ConnectionPoolConfiguratorMXBean

All Known Implementing Classes:
TomcatConnectionPoolConfigurator

public interface ConnectionPoolConfiguratorMXBean
A JMX MBean interface for monitoring and controlling database connection pools.
Author:
RealLifeDeveloper
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Forces an abandon check on the connection pool.
    void
    Forces a check for resizing of the idle connections.
    int
    Gives the number of connections in use by the application.
    Gives the fully qualified Java class name of the JDBC driver used.
    int
    Gives the number of established but idle connections.
    int
    Gives the current size of the pool.
    Gives the URL used to connect to the database.
    int
    Gives the number of threads waiting for a connection.
    void
    Purges all connections in the pool.
    void
    Purges connections when they are returned from the pool.
    void
    Performs a validation on idle connections.
  • Method Details

    • getUrl

      String getUrl()
      Gives the URL used to connect to the database.
      Returns:
      the configured URL for this connection pool
    • getDriverClassName

      String getDriverClassName()
      Gives the fully qualified Java class name of the JDBC driver used.
      Returns:
      the fully qualified JDBC driver name
    • getSize

      int getSize()
      Gives the current size of the pool.
      Returns:
      the current size of the pool
    • getIdle

      int getIdle()
      Gives the number of established but idle connections.
      Returns:
      the number of established but idle connections
    • getActive

      int getActive()
      Gives the number of connections in use by the application.
      Returns:
      the number of connections in use by the application
    • getWaitCount

      int getWaitCount()
      Gives the number of threads waiting for a connection.
      Returns:
      the number of threads waiting for a connection
    • checkIdle

      void checkIdle()
      Forces a check for resizing of the idle connections.
    • checkAbandoned

      void checkAbandoned()
      Forces an abandon check on the connection pool.

      If connections that have been abandoned exists, they will be closed during this run.

    • testIdle

      void testIdle()
      Performs a validation on idle connections.
    • purge

      void purge()
      Purges all connections in the pool. For connections currently in use, these connections will be purged when returned on the pool. This call also purges connections that are idle and in the pool.

      To only purge used/active connections see purgeOnReturn()

    • purgeOnReturn

      void purgeOnReturn()
      Purges connections when they are returned from the pool. This call does not purge idle connections until they are used.

      To purge idle connections see purge()