skip to main content
About the Driver : Using the driver : Statement Pool Monitor : Accessing the Statement Pool Monitor : Using DataDirect-specific methods to access the Statement Pool Monitor : Using the poolEntries Method
  

Try DataDirect Drivers Now
Using the poolEntries Method
Using the poolEntries() method, your application can return all statements in the pool or filter the list based on the following criteria:
*Statement type (prepared statement or callable statement)
*Result set type (forward only, scroll insensitive, or scroll sensitive)
*Concurrency type of the result set (read only and updateable)
The following table lists the parameters and the valid values supported by the poolEntries() method.
Table 13. poolEntries() Parameters
Parameter
Value
Description
statementType
ExtStatementPoolMonitor.TYPE_PREPARED_STATEMENT
Returns only prepared statements
ExtStatementPoolMonitor.TYPE_CALLABLE_STATEMENT
Returns only callable statements
-1
Returns all statements regardless of statement type
resultSetType
ResultSet.TYPE_FORWARD_ONLY
Returns only statements with forward-only result sets
ResultSet.TYPE_SCROLL_INSENSITIVE
Returns only statements with scroll insensitive result sets
ResultSet.TYPE_SCROLL_SENSITIVE
Returns only statements with scroll sensitive result sets
-1
Returns statements regardless of result set type
resultSetConcurrency
ResultSet.CONCUR_READ_ONLY
Returns only statements with a read-only result set concurrency
ResultSet.CONCUR_UPDATABLE
Returns only statements with an updateable result set concurrency
-1
Returns statements regardless of result set concurrency type
The result of the poolEntries() method is an array that contains a String entry for each statement in the statement pool using the format:
SQL_TEXT=[SQL_text];STATEMENT_TYPE=TYPE_PREPARED_STATEMENT|
TYPE_CALLABLE_STATEMENT;RESULTSET_TYPE=TYPE_FORWARD_ONLY|
TYPE_SCROLL_INSENSITIVE|TYPE_SCROLL_SENSITIVE;
RESULTSET_CONCURRENCY=CONCUR_READ_ONLY|CONCUR_UPDATABLE;
AUTOGENERATEDKEYSREQUESTED=true|false;
REQUESTEDKEYCOLUMNS=comma-separated_list
where SQL_text is the SQL text of the statement and comma-separated_list is a list of column names that will be returned as generated keys.
For example:
SQL_TEXT=[INSERT INTO emp(id, name) VALUES(99, ?)];
STATEMENT_TYPE=Prepared Statement;RESULTSET_TYPE=Forward Only;
RESULTSET_CONCURRENCY=ReadOnly;AUTOGENERATEDKEYSREQUESTED=false;
REQUESTEDKEYCOLUMNS=id,name