JDBC Type 4 Driver Programmer's Reference for SQL/MX Release 3.2.1

Setting Properties
For connections made through a DataSource or a ConnectionPoolDataSource, set the
property on the DataSource or the ConnectionPoolDataSource object.
For the DriverManager class, set properties in either of two ways:
Using the option -Dproperty_name=property_value in the command line
Using the java.util.Properties parameter in the getConnection() method of
the DriverManager class
Creating and Using a Properties File
JDBC applications can provide property values to configure a connection by using a file that
contains properties for the JDBC driver. This property file is passed as a java command-line
parameter. The format to enter the properties file in the command line is:
-Dt4sqlmx.properties=location_of_the_properties_file_on_disk
For example,
-Dt4sqlmx.properties=C:\temp\t4props
To create the file, use the editor of your choice on your workstation to type in the property values.
The entries in properties file must have a property_name=property_value value-pair format:
property_name=property_value
For example, maxStatements=1024
To configure a DataSource connection, the properties file might contain property names and values
as indicated in the following list:
url=jdbc:t4sqlmx://mynode.mycompanynetwork.net:port_number/
user=NSK_username
password=mypassword
description=a string
catalog=sampcat
schema=myschema
maxPoolSize=20
minPoolSize=5
maxStatements=20
loginTimeout=15
initialPoolSize=10
connectionTimeout=10
serverDataSource=MXCS_server_data_source
T4LogLevel=OFF
T4LogFile=/mylogdirectory/mylogfile
Setting Properties in the Command Line
When a Type 4 driver property is specified on the command line through the java -D option,
the property must include the prefix:
t4sqlmx.
This notation, which includes the period (.), ensures that all the Type 4 driver property names are
unique for a Java application. For example, the maxStatements property becomes:
-Dt4sqlmx.maxStatements=10
Precedence of Property Specifications
If a particular property is set several ways by an application, the value used depends on how the
value was set according to the following order of precedence:
Specifying JDBC Type 4 Properties 37