skip to main content
DataDirect tools : Statement Pool Monitor : Using DataDirect-specific methods to access the Statement Pool Monitor
  

Try DataDirect Drivers Now

Using DataDirect-specific methods to access the Statement Pool Monitor

To access the Statement Pool Monitor using DataDirect-specific methods, you should first enable statement pooling. You can enable statement pooling by setting the MaxPooledStatements connection property to a value greater than zero (0). For more information, refer to "MaxPooledStatements" in the user's guide for your driver.
The ExtConnection.getStatementPoolMonitor() method returns an ExtStatementPoolMonitor object for the statement pool associated with the connection. This method is provided by the ExtConnection interface in the com.ddtek.jdbc.extensions package. If the connection does not have a statement pool, the method returns null.
Once you have an ExtStatementPoolMonitor object, you can use the poolEntries() method of the ExtStatementPoolMonitorMBean interface implemented by the ExtStatementPoolMonitor to return a list of statements in the statement pool as an array.
* Using the poolEntries method
* Generating a list of statements in the statement pool