Neoview JDBC Type 4 Driver Programmer's Reference (R2.2, R2.3, R2.4, R2.5)
How to Specify JDBC Type 4 Properties
The Type 4 JDBC driver properties configure the driver. These properties can be specified in a
data source, a connection URL (the primary IP address or host name on the Neoview SQL
database), a properties file, or in the java command line.
Java properties have the form: key=value
At run time, the driver looks for a specific set of property keys and takes action based on their
associated values.
The topics in this discussion include:
• “Where to Set Properties” (page 38)
• “Creating and Using a Properties File” (page 38)
• “Setting Properties in the Command Line” (page 39)
• “Precedence of Property Specifications” (page 39)
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:
-Dhpt4jdbc.properties=path_of_the_properties_file_on_disk
For example,
-Dhpt4jdbc.properties=C:\temp\t4props\myprops.properties
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:hpt4jdbc://<primary_IP_addr_or_host_name_on_Neoview_DB>:18650/
user=Neoview_database_username
password=mypassword
description=a string
catalog=Neo
schema=myschema
maxPoolSize=20
minPoolSize=5
maxStatements=20
loginTimeout=15
initialPoolSize=10
connectionTimeout=10
serverDataSource=HP_server_data_source
T4LogLevel=OFF
T4LogFile=/mylogdirectory/mylogfile
38 Type 4 Driver Properties