Scalable Database Server, HiRDB Version 8 UAP Development Guide

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

17.11 Connection information priorities

Organization of this section
(1) List of connection information priorities
(2) Priorities when the authorization identifier or password is not specified

(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 variables). Table 17-47 lists the connection information items that have multiple setup methods, and the priorities when items are set concurrently by multiple setup methods.

Table 17-47 Priorities for connection information

Meaning of connection information Setup method Priority
A B C
HiRDB host name DBHOST in URL 1 -- --
PDHOST in HiRDB client environment variables specified by HiRDB_for_Java_ENV_VARIABLES in Properties argument of DriverManager.getConnection 2 -- --
PDHOST in HiRDB environment variable group specified by DBID in URL 3 -- --
setDBHostName method of DataSource interface -- 1 1
PDHOST in HiRDB client environment variables specified by setEnvironmentVariables method of DataSource interface -- 2 2
PDHOST in HiRDB environment variable group specified by setDescription method of DataSource interface -- 3 --
PDHOST in HiRDB environment variable group specified by XADataSource.setXAOpenString -- -- 3
HiRDB port number DBID in URL 1 -- --
PDNAMEPORT in HiRDB client environment variables specified by HiRDB_for_Java_ENV_VARIABLES in Properties argument of DriverManager.getConnection 2 -- --
PDNAMEPORT in HiRDB environment variable group specified by DBID in URL 3 -- --
setDescription method of DataSource interface -- 1 1
PDNAMEPORT in HiRDB client environment variables specified by setEnvironmentVariables method of DataSource interface -- 2 2
PDNAMEPORT in HiRDB environment variable group specified by setDescription method of DataSource interface -- 3 --
PDNAMEPORT in HiRDB environment variable group specified by XADataSource.setXAOpenString -- -- 3
Authorization identifier used during connection#1 user argument or user in Properties argument of DriverManager.getConnection 1 -- --
Argument in getConnection method of DataSource interface or argument in getPooledConnection method of ConnectionPoolDataSource interface -- 1 --
Argument in getXAConnection method of XADataSource interface -- -- 1
setUser method of DataSource interface -- 2 2
Password used during connection#1 password argument or password in Properties argument of DriverManager.getConnection 1 -- --
Argument in getConnection method of DataSource interface, or argument in getPooledConnection method of ConnectionPoolDataSource interface -- 1 --
Argument in getXAConnection method of XADataSource interface -- -- 1
setPassword method of DataSource interface -- 2 2
UAP name#2 UAPNAME property in Properties argument of DriverManager.getConnectionoperties 1 -- --
PDCLTAPNAME in HiRDB client environment variables specified by HiRDB_for_Java_ENV_VARIABLES in Properties argument of DriverManager.getConnection 2 -- --
PDCLTAPNAME in HiRDB environment variable group specified by DBID in URL 3 -- --
setUapName method of DataSource interface -- 1 1
PDCLTAPNAME in HiRDB client environment variables specified by setEnvironmentVariables method of DataSource interface -- 2 2
PDCLTAPNAME in HiRDB environment variable group specified by setDescription method of DataSource interface -- 3 --
PDCLTAPNAME in HiRDB environment variable group specified by XADataSource.setXAOpenString -- -- 3
Conversion character set ENCODELANG property in Properties argument of DriverManager.getConnection 1 -- --
ENCODELANG in URL 2 -- --
setEncodeLang of DataSource interface -- 1 1
Cursor operation mode HIRDB_CURSOR property in Properties argument of DriverManager.getConnection 1 -- --
HIRDB_CURSOR in URL 2 -- --
setHiRDBCursorMode of DataSource interface -- 1 1
Status after statement commit execution HiRDB_for_Java_STATEMENT_COMMIT_BEHAVIOR property in Properties argument of DriverManager.getConnection 1 -- --
STATEMENT_COMMIT_BEHAVIOR in URL 2 -- --
setStatementCommitBehavior of DataSource interface -- 1 1
Login wait time DriverManager.setLoginTimeout 1 -- --
PDCONNECTWAITTIME in HiRDB client environment variables specified by HiRDB_for_Java_ENV_VARIABLES in Properties argument of DriverManager.getConnection 2 -- --
PDCONNECTWAITTIME in HiRDB environment variable group specified by DBID in URL 3 -- --
setLoginTimeout of DataSource interface -- 1 1
PDCONNECTWAITTIME in HiRDB client environment variables specified by setEnvironmentVariables method of DataSource interface -- 2 2
PDCONNECTWAITTIME in HiRDB environment variable group specified by setDescription method of DataSource interface -- 3 --
PDCONNECTWAITTIME in HiRDB environment variable group specified by XADataSource.setXAOpenString -- -- 3

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
For details about priorities when no authorization identifier or password is specified, see (2) Priorities when the authorization identifier or password is not specified.

#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 when the authorization identifier or password is not specified

This item shows the priorities when the authorization identifier or password is not specified.

When the authorization identifier is specified by the method shown in Table 17-47 and the password is not specified
The JDBC driver determines the authorization identifier according to the priority sequence shown in Table 17-47. The driver assumes that a password has not been specified.

When the authorization identifier is not specified
The specifications shown in Table 17-48 become effective whether or not a password is specified.

Table 17-48 Specifications that become effective when an authorization identifier is not specified

Specification of PDUSER in HiRDB environment variable group Authorization identifier and password that become effective
Specification 1 Specification 2
[A]
PDUSER is specified in HiRDB client environment variables specified by HiRDB_for_Java_ENV_VARIABLES in Properties argument of DriverManager.getConnection.
-- Specification in [A] becomes effective.
[A] is not specified. [B]
PDUSER is specified in the HiRDB environment variable group specified by DBID in the URL.
Specification in [B] becomes effective.
[B] is not specified. Throws an SQLException.
[C]
PDUSER is specified in HiRDB client environment variable group specified by setEnvironmentVariables method of DataSource interface.
-- Specification in [C] becomes effective.
[C] is not specified. [D]
PDUSER is specified in the HiRDB environment variable group specified by the setDescription method of the DataSource interface.
Specification in [D] becomes effective.
[E]
PDUSER is specified in the HiRDB environment variable group specified by the setXAOpenString method of the XADataSource interface.
Specification in [E] becomes effective.
[D] and [E] are not specified. Throws an SQLException.

Legend:
--: Not related to the specification value.