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 TypeMethodDescriptionvoidForces an abandon check on the connection pool.voidForces a check for resizing of the idle connections.intGives the number of connections in use by the application.Gives the fully qualified Java class name of the JDBC driver used.intgetIdle()Gives the number of established but idle connections.intgetSize()Gives the current size of the pool.getUrl()Gives the URL used to connect to the database.intGives the number of threads waiting for a connection.voidpurge()Purges all connections in the pool.voidPurges connections when they are returned from the pool.voidtestIdle()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()
-