Connection and connection pool statistics

Performance Monitoring Infrastructure (PMI) method calls that are supported in the two existing Connection Managers (JDBC and J2C) are still supported in this version of WebSphere Application Server. The calls include:

  • ManagedConnectionsCreated

  • ManagedConnectionsAllocated

  • ManagedConnectionFreed

  • ManagedConnectionDestroyed

  • BeginWaitForConnection

  • EndWaitForConnection

  • ConnectionFaults

  • Average number of ManagedConnections in the pool

  • Percentage of the time that the connection pool is using the maximum number of ManagedConnections

  • Average number of threads waiting for a ManagedConnection

  • Average percent of the pool that is in use

  • Average time spent waiting on a request

  • Number of ManagedConnections that are in use

  • Number of Connection Handles

  • FreePoolSize

  • UseTime

Java Specification Request (JSR) 77 requires statistical data to be accessed through managed beans (Mbeans) to facilitate this. The Connection Manager passes the ObjectNames of the Mbeans created for this pool. In the case of Java Message Service (JMS) null is passed in. The interface used is

PmiFactory.createJ2CPerf(
    String pmiName, // a unique Identifier for JCA /JDBC.  This is the  
                    // ConnectionFactory name.

    ObjectName providerName,// the ObjectName of the J2CResourceAdapter
                            // or JDBCProvider Mbean
    
    ObjectName factoryName // the ObjectName of the J2CConnectionFactory
                           // or DataSourceMbean.
)

The following Unified Modeling Language (UML) diagram shows how JSR 77 requires statistics to be reported :

In WebSphere Application Server V5.x, the JCAStats interface was implemented by the J2CResourceAdapter Mbean, and the JDBCStats interface was implemented by the JDBCProvider Mbean. The JCAConnectionStats and JDBCConnectionStats interfaces are not implemented because they collect statistics for non pooled connections - which are not present in the JCA 1.0 Specification. JCAConnectionPoolStats, and JDBCConnectionPoolStats do not have a direct implementing Mbean; those statistics are gathered through a call to PMI. A J2C resource adapter, and JDBC provider each contain a list of ConnectionFactory or DataSource ObjectNames, respectively. The ObjectNames are used by PMI to find the appropriate connection pool in the list of PMI modules.

The JCA 1.5 Specification allows an exception from the matchManagedConnection() method that indicates that the resource adapter requests that the connection not be pooled. In that case, statistics for that connection are provided separately from the statistics for the connection pool.