JDBC Type 4 Driver 1.1 Programmer's Reference
url
Sets the URL value for the MXCS
association server. Can be set only on
the DriverManager object.
None
user
Sets the URL value for the MXCS
association server.
None
How to Specify JDBC Type 4 Properties
Where To Set Properties
Creating and Using a Properties File
Setting Properties in the Command Line
Precedence of Property Specifications
The Type 4 JDBC driver properties configure the driver. These properties can be specified in a
data source, a connection URL, a properties file, or in the java command line.
Java properties have the form: key=value
At runtime, the driver looks for a specific set of property keys and takes action based on their
associated values.
Where To Set 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