Interface ConnectionPoolStatsMXBean


public interface ConnectionPoolStatsMXBean

Management interface for the connection pool statistics MBean. One connection pool MBean instance exists per datasource or connection factory, whether configured explicitly in server configuration or whether it exists implicitly due to a @DataSourceDefinition or @ConnectionFactoryDefinition annotation. The Liberty profile makes this MBean available in its platform MBean server when the monitor-1.0 feature is enabled to allow monitoring of the connection pool.

Important: the MBean instance is not available until the connection factory or data source is first used.

The object name has the form WebSphere:type=ConnectionPoolStats,name=* where name is either the JNDI name, if defined, or id of the DataSource or ConnectionFactory. The id may be explicitly defined or generated by the server, as exemplified in the DefaultDataSource snippet below.

Object name examples:

  • WebSphere:type=ConnectionPoolStats,name=jdbc/db2
    corresponds to a dataSource instance with a server configuration-defined JNDI name. For example,
    <dataSource jndiName="jdbc/db2">
     ...
    </dataSource>
  • WebSphere:type=ConnectionPoolStats,name=dataSource[DefaultDataSource]/connectionManager[default-0]
    corresponds to a dataSource instance configured as the Java EE default datasource. For example,
    <dataSource id="DefaultDataSource">
     ...
    </dataSource>
  • WebSphere:type=ConnectionPoolStats,name=jmsConnectionFactory[cf1]/connectionManager[default-0]
    corresponds to a connection factory instance explicitly configured in server configuration with an id. For example,
    <jmsConnectionFactory id="cf1">
     ...
    </jmsConnectionFactory>
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    The number of connections that are in use, including multiple connections shared from a single managed connection.
    long
    The total number of managed connections created since pool creation.
    long
    The total number of managed connections destroyed since pool creation.
    long
    The number of managed connections in the free pool.
    double
    The average time in milliseconds a connection is in use.
    com.ibm.websphere.monitor.jmx.StatisticsMeter
    Retrieves StatisticMeter object of InUseTime detail, which provides statistical details on the connection in use time.
    long
    The total number of managed connections in the free, shared, and unshared pools.
    long
    The maximum connections allowed in the connection pool
    double
    The average waiting time in milliseconds until a connection is granted if a connection is not currently available.
    com.ibm.websphere.monitor.jmx.StatisticsMeter
    Retrieves StatisticMeter object of WaitTime detail, which provides statistical details on the connection wait time.
  • Method Details

    • getCreateCount

      long getCreateCount()
      The total number of managed connections created since pool creation.
    • getDestroyCount

      long getDestroyCount()
      The total number of managed connections destroyed since pool creation.
    • getConnectionHandleCount

      long getConnectionHandleCount()
      The number of connections that are in use, including multiple connections shared from a single managed connection.
    • getManagedConnectionCount

      long getManagedConnectionCount()
      The total number of managed connections in the free, shared, and unshared pools.
    • getWaitTime

      double getWaitTime()
      The average waiting time in milliseconds until a connection is granted if a connection is not currently available.
    • getWaitTimeDetails

      com.ibm.websphere.monitor.jmx.StatisticsMeter getWaitTimeDetails()
      Retrieves StatisticMeter object of WaitTime detail, which provides statistical details on the connection wait time.
      Returns:
      wait time details
    • getFreeConnectionCount

      long getFreeConnectionCount()
      The number of managed connections in the free pool.
    • getInUseTime

      double getInUseTime()
      The average time in milliseconds a connection is in use.
    • getInUseTimeDetails

      com.ibm.websphere.monitor.jmx.StatisticsMeter getInUseTimeDetails()
      Retrieves StatisticMeter object of InUseTime detail, which provides statistical details on the connection in use time.
      Returns:
      in use time details
    • getMaxConnectionsLimit

      long getMaxConnectionsLimit()
      The maximum connections allowed in the connection pool
      Returns:
      maximum connection count