Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

18.11 Connection information priorities

Organization of this section
(1) List of connection information priorities
(2) Priorities for other client environment definitions

(1) List of connection information priorities

The JDBC driver enables you to specify synonymous connection information by using multiple setup methods (for example, DBHOST specified in the URL and PDHOST specified in HiRDB client environment definition). The following table lists the connection information items that have multiple setup methods; it also shows the priorities when items are set concurrently by multiple setup methods.

Table 18-82 Priorities for connection information

Meaning of connection information Setup method Priority
A B C
HiRDB host name HiRDB_for_Java_PDHOST specified in system properties 1 1 1
HiRDB_for_Java_DBHOST property in the Properties argument of DriverManager.getConnection 2 -- --
DBHOST in the URL 3 -- --
PDHOST in the HiRDB client environment definition specified in HiRDB_for_Java_ENV_VARIABLES in the Properties argument of DriverManager.getConnection 4 -- --
PDHOST in the HiRDB environment variable group specified in HiRDB_for_Java_DBID in the Properties argument of DriverManager.getConnection 5 -- --
PDHOST in the HiRDB environment variable group specified in DBID in the URL 6 -- --
PDHOST in the HiRDB.ini file specified in HiRDB_for_Java_HiRDB_INI in the Properties argument of DriverManager.getConnection 7 -- --
PDHOST in the HiRDB.ini file specified in HiRDB_INI in the URL 8 -- --
setDBHostName method of DataSource interface -- 2 2
PDHOST in the HiRDB client environment definition specified in the setEnvironmentVariables method of the DataSource interface -- 3 3
PDHOST in the HiRDB environment variable group specified by setDescription method of the DataSource interface -- 4 --
PDHOST in the HiRDB environment variable group specified by XADataSource.setXAOpenString -- -- 4
PDHOST in a HiRDB.ini file specified in the setHiRDBINI method of the DataSource interface -- 5 5
HiRDB port number HiRDB_for_Java_ PDNAMEPORT specified in system properties 1 1 1
HiRDB_for_Java_DBID property in the Properties argument of DriverManager.getConnection 2 -- --
DBID in the URL 3 -- --
PDNAMEPORT in the HiRDB client environment definition specified in HiRDB_for_Java_ENV_VARIABLES in the Properties argument of DriverManager.getConnection 4 -- --
PDNAMEPORT in the HiRDB environment variable group specified in HiRDB_for_Java_DBID in the Properties argument of DriverManager.getConnection 5 -- --
PDNAMEPORT in the HiRDB environment variable group specified in DBID in the URL 6 -- --
PDNAMEPORT in the HiRDB.ini file specified in HiRDB_for_Java_HiRDB_INI in the Properties argument of DriverManager.getConnection 7 -- --
PDNAMEPORT in the HiRDB.ini file specified in HiRDB_INI in the URL 8 -- --
setDescription method of the DataSource interface -- 2 2
PDNAMEPORT in the HiRDB client environment definition specified in the setEnvironmentVariables method of a DataSource interface -- 3 3
PDNAMEPORT in the HiRDB environment variable group specified by setDescription method of the DataSource interface -- 4 --
PDNAMEPORT in the HiRDB environment variable group specified by XADataSource.setXAOpenString -- -- 4
PDNAMEPORT in the HiRDB.ini file specified in the setHiRDBINI method of the DataSource interface -- 5 5
User name used to establish connection, password#1 HiRDB_for_Java_PDUSER specified in system properties 1 1 1
user and password arguments in DriverManager.getConnection or user and password in the Properties argument 2 -- --
USER and PASSWORD in the URL 3 -- --
PDUSER in the HiRDB client environment variable specified in HiRDB_for_Java_ENV_VARIABLES in the Properties argument of DriverManager.getConnection 4 -- --
PDUSER in the HiRDB environment variable group specified in HiRDB_for_Java_DBID in the Properties argument of DriverManager.getConnection 5 -- --
PDUSER in the HiRDB environment variable group specified in DBID in the URL 6 -- --
PDUSER in the HiRDB.ini file specified in HiRDB_for_Java_HiRDB_INI in the Properties argument of DriverManager.getConnection 7 -- --
PDUSER in the HiRDB.ini file specified in HiRDB_INI in the URL 8 -- --
Argument in the getConnection method of the DataSource interface or argument in the getPooledConnection method of the ConnectionPoolDataSource interface -- 2 --
Argument in the getXAConnection method of XADataSource interface -- -- 2
setUser and setPassword methods of the DataSource interface -- 3 3
PDUSER in the HiRDB client environment variable specified in the setEnvironmentVariables method of the DataSource interface -- 4 4
PDUSER in the HiRDB environment variable group specified in the setDescription method of the DataSource interface -- 5 --
PDUSER in the HiRDB environment variable group specified in XADataSource.setXAOpenString -- -- 5
PDUSER in the HiRDB.ini file specified in the setHiRDBINI method of a DataSource interface -- 6 6
UAP name#2 HiRDB_for_Java_ PDCLTAPNAME specified in system properties 1 1 1
UAPNAME property in the Properties argument of the DriverManager.getConnectionoperties 2 -- --
UAPNAME in the URL 3 -- --
PDCLTAPNAME in the HiRDB client environment definition specified in HiRDB_for_Java_ENV_VARIABLES in the Properties argument of DriverManager.getConnection 4 -- --
PDCLTAPNAME in the HiRDB environment variable specified in HiRDB_for_Java_DBID in the Properties argument of DriverManager.getConnection 5 -- --
PDCLTAPNAME in the HiRDB environment variable group specified in DBID in the URL 6 -- --
PDCLTAPNAME in the HiRDB.ini file specified in HiRDB_for_Java_HiRDB_IN in the Properties argument of DriverManager.getConnection 7 -- --
PDCLTAPNAME in the HiRDB.ini file specified in HiRDB_INI in the URL 8 -- --
setUapName method of DataSource interface -- 2 2
PDCLTAPNAME in the HiRDB client environment definition specified in the setEnvironmentVariables method of the DataSource interface -- 3 3
PDCLTAPNAME in the HiRDB environment variable group specified by the setDescription method of DataSource interface -- 4 --
PDCLTAPNAME in the HiRDB environment variable group specified by XADataSource.setXAOpenString -- -- 4
PDCLTAPNAME in the HiRDB.ini file specified in the setHiRDBINI method of the DataSource interface -- 5 5
Conversion character set ENCODELANG property in the Properties argument of DriverManager.getConnection 1 -- --
ENCODELANG in the URL 2 -- --
setEncodeLang of the DataSource interface -- 1 1
Cursor operation mode HIRDB_CURSOR property in the Properties argument of DriverManager.getConnection 1 -- --
HIRDB_CURSOR in the URL 2 -- --
setHiRDBCursorMode of the DataSource interface -- 1 1
Status after statement commit execution HiRDB_for_Java_DAB_STATEMENT_COMMIT_BEHAVIOR specified in system properties 1 1 1
HiRDB_for_Java_STATEMENT_COMMIT_BEHAVIOR property in the Properties argument of DriverManager.getConnection 2 -- --
STATEMENT_COMMIT_BEHAVIOR in the URL 3 -- --
setStatementCommitBehavior of the DataSource interface -- 2 2
Login wait time HiRDB_for_Java_PDCONNECTWAITTIME specified in system properties 1 1 1
DriverManager.setLoginTimeout 2 -- --
PDCONNECTWAITTIME in the HiRDB client environment definition specified in HiRDB_for_Java_HiRDB_IN in the Properties argument of DriverManager.getConnection 3 -- --
PDCONNECTWAITTIME in the HiRDB environment variable group specified in DBID in the Properties argument of DriverManager.getConnection 4 -- --
PDCONNECTWAITTIME in the HiRDB environment variable group specified by DBID in the URL 5 -- --
PDCONNECTWAITTIME in the HiRDB.ini file specified in HiRDB_for_Java_HiRDB_INI in the Properties argument of DriverManager.getConnection 6 -- --
PDCONNECTWAITTIME in the HiRDB.ini file specified in HiRDB_INI in the URL 7 -- --
setLoginTimeout of the DataSource interface -- 2 2
PDCONNECTWAITTIME in the HiRDB client environment definition specified in the setEnvironmentVariables method of the DataSource interface -- 3 3
PDCONNECTWAITTIME in the HiRDB environment variable group specified by the setDescription method of the DataSource interface -- 4 --
PDCONNECTWAITTIME in the HiRDB environment variable group specified by XADataSource.setXAOpenString -- -- 4
PDCONNECTWAITTIME in the HiRDB.ini file specified in the setHiRDBINI method of the DataSource interface -- 5 5
Discarding of SQL preprocessing results during execution of the close method of Statement HiRDB_for_Java_STATEMENT_CLOSE_BEHAVIOR specified in system properties 1 1 1
HiRDB_for_Java_STATEMENT_CLOSE_BEHAVIOR property in the Properties argument of DriverManager.getConnection 2 -- --
STATEMENT_CLOSE_BEHAVIOR in the URL 3 -- --
setStatementCloseBehavior of the DataSource interface -- 2 2

Legend:
A: For connection that uses DriverManager
B: For non-XA connection that uses the DataSource interface
C: For XA connection that uses the XADataSource interface
--: Cannot be specified for the connection method.

#1
If you specify a user name but omit a password, the JDBC driver assumes that no password is specified. If you omit a user name but specify a password, the specified password is ignored and the specification with the next highest priority takes effect.

#2
If this information cannot be set with the setting method shown in this table, the JDBC driver operates with the information set by the HiRDB_Type4_JDBC_Driver, which is the product name of the JDBC driver.

(2) Priorities for other client environment definitions

The following table shows the priorities for other HiRDB client environment definitions:

Priority Client environment variable
1 System property
2 HiRDB client environment definition specified in HiRDB_for_Java_ENV_VARIABLES in the Properties argument of DriverManager.getConnection
3 Client environment variable in a HiRDB environment variable group file specified in HiRDB_for_Java_DBID in the Properties argument of DriverManager.getConnection
4 Client environment definition in a HiRDB environment variable group file specified in DBID in the URL in DriverManager.getConnection
5 HiRDB client environment variable specified in a HiRDB.ini file under the directory specified in HiRDB_for_Java_HiRDB_INI in the Properties argument of DriverManager.getConnection
6 HiRDB client environment variable specified in a HiRDB.ini file in the directory specified in HiRDB_INI in the URL in DriverManager.getConnection

Notes
  • If a HiRDB environment variable group file is specified in HiRDB_for_Java_DBID in the Properties argument of DriverManager.getConnection and in DBID in the URL, the DBID specification in the URL is ignored.
  • If HiRDB_for_Java_HiRDB_INI is specified in the Properties argument of DriverManager.getConnection and HiRDB_INI is specified in the URL, the HiRDB_IN specification in the URL is ignored.