JDBC Driver for SQL/MX Programmer's Reference

Guidelines for Using Connections with the DriverManager Class
Java applications can specify the properties in the following ways:
Using JDBC/MX properties with the -D option in the command line. If used, this
option applies to all JDBC connections using the DriverManager within the Java
application. The format is to enter the following in the command line:
-Djdbcmx.property_name=property_value
For example in a command line, -Djdbcmx.maxStatements=1024
Using the java.util.properties parameter in the getConnection method of
DriverManager.
The properties passed through the java.util.properties parameter have a higher
precedence over the command-line properties.
The connection pooling feature is available when the Java application uses the
DriverManager class to obtain a JDBC connection. The connection pool size is
determined by the maxPoolSize property value and minPoolSize property value.
The JDBC/MX driver has a connection-pool manager for a combination of catalog and
schema; therefore, connections with the same catalog and schema combinations are pooled
together. The connection pooling property values that are used at the time of obtaining the
first connection for a given catalog and schema combination is effective throughout the life of
the process. An application cannot change these property values subsequent to the first
connection for a given catalog and schema combination.
As in the basic DataSource object implementation, a Java application can enable statement
pooling by setting the property to a non-zero positive value.
Connection Using the DataSource Interface
The DataSource interface, introduced in the JDBC 2.0 optional package, is the preferred way to
establish a connection to the database because it enhances the application portability. The JDBC/MX
driver implements the DataSource interface and returns a connection object when an application
requests a connection using the getConnection method in the DataSource interface.
Using a DataSource object increases the application portability by allowing the application to use
a logical name for a data source instead of providing driver-specific information in the application. A
logical name is mapped to a DataSource object by means of a naming service that uses the Java
Naming and Directory Interface (JNDI).
The following table describes the properties that you can use to identify a JDBC/MX data source
object:
DataSource Object Properties
Property Name Type Value Description