JDBC Type 4 Driver 1.1 Programmer's Reference
Stored Procedures
Java applications can use the JDBC standard CallableStatement interface to run stored procedures (SPJs) by using the
CALL statement. For further information, see the SQL/MX Guide to Stored Procedures in Java.
The following SPJ features are not supported:
An SPJ returning java.sql.ResultSet●
executeBatch for callableStatements●
setXXX() methods with parameter names instead of parameter numbers●
Connection Pooling
The Type 4 driver provides an implementation of connection pooling, where a cache of physical database connections are
assigned to a client session and reused for the database activity. If connection pooling is active, connections are not physically
closed. The connection is returned to its connection pool when the Connection.close() method is called. The next time
a connection is requested by the client, the driver will return the pooled connection, and not a new physical connection.
The connection pooling feature is available when the JDBC application uses either the DriverManager class or
DataSource interface to obtain a JDBC connection. The connection pool size is determined by the maxPoolSize
property value and minPoolSize property value.
●
By default, connection pooling is disabled. To enable connection pooling, set the maxPoolSize property to an integer
value greater than 0 (zero).
●
Manage connection pooling by using the following Type 4 driver properties:
maxPoolSize❍
minPoolSize❍
initialPoolSize❍
maxStatements❍
●
When used with the DriverManager class, the Type 4 driver has a connection-pool manager that determines which
connections are pooled together by a unique value for the following combination of properties:
url
catalog
schema
username
password
blobTableName
clobTableName
serverDataSource
Therefore, connections that have the same values for the combination of a set of properties are pooled together.
Note: The connection-pooling property values used at the first connection of a given combination are effective
throughout the life of the process. An application cannot change any of these property values after the first
connection for a given combination.
●
Statement Pooling
Guidelines for Statement Pooling
Troubleshooting Statement Pooling
The statement pooling feature allows applications to reuse the PreparedStatement object in same way that they can reuse
a connection in the connection pooling environment. Statement pooling is done completely transparent to the application.