Hitachi

Hitachi Advanced Database Application Development Guide


7.3.3 Connection information priorities

Organization of this subsection

(1) Connection information needed when a connection to the HADB server is established

When a connection to the HADB server is established, the following connection information is required:

The JDBC driver enables you to use any of several methods of specifying this connection information. For example, the HADB server's host name can be specified with the adb_clt_rpc_srv_host system property as well as in host for the connection URL.

The following table shows the priorities when the connection information is specified by multiple methods.

Table 7‒4: Priorities for connection information

Connection information

Specification method

Priority

DM

DS

HADB server's host name

Value of the adb_clt_rpc_srv_host system property

1

1

adb_clt_rpc_srv_host property value specified in the info argument of the getConnection method of the DriverManager class

2

--

Value of host specified in the url argument of the getConnection method of the DriverManager class

3

--

Host name specified by the setHostName method of an interface for setting/getting connection information

--

2

HADB server's port number

Value of the adb_clt_rpc_srv_port system property

1

1

adb_clt_rpc_srv_port property value specified in the info argument of the getConnection method of the DriverManager class

2

--

Value of port specified in the url argument of the getConnection method of the DriverManager class

3

--

Port number specified by the setPort method of an interface for setting/getting connection information

--

2

Authorization identifier and password used for establishing a connection

One of the following sets of values:

  • Values of the user and password arguments of the getConnection method of the DriverManager class

  • user and password property values specified in the info argument of the getConnection method of the DriverManager class

1

--

Values of user and password specified in the url argument of the getConnection method of the DriverManager class

2

--

One of the following sets of values:

  • Values of the username and password arguments of the getConnection method of the DataSource interface

  • Values of the user and password arguments of the getPooledConnection method of the ConnectionPoolDataSource interface

--

1

  • Authorization identifier specified by the setUser method of an interface for setting/getting connection information

  • Password specified by the setPassword method of an interface for setting/getting connection information

--

2

Application identifier

Value of the adb_clt_ap_name system property

1

1

adb_clt_ap_name property value specified in the info argument of the getConnection method of the DriverManager class

2

--

Value of adb_clt_ap_name specified in the url argument of the getConnection method of the DriverManager class

3

--

Application identifier specified by the setApName method of the connection information setup and acquisition interface

--

2

Timeout time for HADB server connection processing

Value of adb_clt_rpc_con_wait_time system property

1

1

Value of adb_clt_rpc_con_wait_time specified in the info argument of the getConnection method of the DriverManager class

2

--

Value of adb_clt_rpc_con_wait_time specified in the url argument of the getConnection method of the DriverManager class

3

--

Value specified in the setLoginTimeout method of the DriverManager class

4

--

One of the following values:

  • Value specified in the setLoginTimeout method of the DataSource interface

  • Value specified in the setLoginTimeout method of the ConnectionPoolDataSource interface

--

2

Other items that can be specified in properties:

  • adb_clt_rpc_sql_wait_time

  • adb_clt_group_name

  • adb_clt_fetch_size

  • adb_clt_sql_text_out

  • adb_clt_trn_iso_lv

  • adb_clt_sql_order_mode

  • adb_sql_prep_dec_div_rs_prior

  • adb_clt_trn_access_mode

  • adb_dbbuff_wrktbl_clt_blk_num

  • adb_sql_prep_delrsvd_use_srvdef

  • adb_sql_exe_max_rthd_num

  • adb_sql_exe_hashgrp_area_size

  • adb_sql_exe_hashtbl_area_size

  • adb_sql_exe_hashflt_area_size

  • adb_jdbc_exc_trc_out_path

  • adb_jdbc_info_max

  • adb_jdbc_cache_info_max

  • adb_jdbc_trc_out_lv

Property values specified in system properties

1

1

Property values specified in the info argument of the getConnection method of the DriverManager class

2

--

Property values specified in the url argument of the getConnection method of the DriverManager class

3

--

Legend:

DM: For a connection that uses the DriverManager class

DS: For a connection that uses the DataSource class

--: Connection information cannot be specified

Note

The smaller the priority number, the higher the priority. Priority number 1 is higher in priority than priority number 2.

(2) List of connection information items that can be specified in individual properties

You can use system properties, user properties, or URL connection properties to specify the connection information needed to establish a connection to the HADB server. The following table lists the connection information that can be specified in individual properties.

Table 7‒5: List of connection information items that can be specified in individual properties

No.

Classification

Property name

Whether specifiable in

System properties

User properties

URL connection properties

1

Properties with the same name and function as in the client definition#1

adb_clt_rpc_srv_host

Y

Y

A#2

2

adb_clt_rpc_srv_port

Y

Y

A#3

3

adb_clt_rpc_con_wait_time

Y

Y

Y

4

adb_clt_rpc_sql_wait_time

Y

Y

Y

5

adb_clt_ap_name

Y

Y

Y

6

adb_clt_group_name

Y

Y

Y

7

adb_clt_fetch_size

Y

Y

Y

8

adb_dbbuff_wrktbl_clt_blk_num

Y

Y

Y

9

adb_sql_exe_max_rthd_num

Y

Y

Y

10

adb_sql_exe_hashgrp_area_size

Y

Y

Y

11

adb_sql_exe_hashtbl_area_size

Y

Y

Y

12

adb_sql_exe_hashflt_area_size

Y

Y

Y

13

adb_sql_prep_delrsvd_use_srvdef

Y

Y

Y

14

adb_clt_trn_iso_lv

Y

Y

Y

15

adb_clt_trn_access_mode

Y

Y

Y

16

adb_clt_sql_text_out

Y

Y

Y

17

adb_clt_sql_order_mode

Y

Y

Y

18

adb_sql_prep_dec_div_rs_prior

Y

Y

Y

19

Properties related to exception trace logs

adb_jdbc_exc_trc_out_path

Y

Y

Y

20

adb_jdbc_info_max

Y

Y

Y

21

adb_jdbc_cache_info_max

Y

Y

Y

22

adb_jdbc_trc_out_lv

Y

Y

Y

23

Other properties

user

N

Y

Y

24

password

N

Y

Y

25

encodelang

N

Y

Y

26

methodtrace

N

Y

Y

27

tracenum

N

Y

Y

28

sqlwarningkeep

N

Y

Y

Legend

Y: Property can be specified.

A: Property cannot be specified, but an alternate specification is available.

N: Property cannot be specified.

#1

Each of these properties has the same name and function as an operand in the client definition.

#2

The adb_clt_rpc_srv_host URL connection property cannot be used to specify the host name of the HADB server at the connection destination. You must use the host URL connection property to specify this host name.

#3

The adb_clt_rpc_srv_port URL connection property cannot be used to specify the port number of the HADB server. You must use the port URL connection property to specify this port number.

Important

The client definition operands are not applicable when the JDBC driver is used. The specified system properties, user properties, or URL connection properties are applied instead.

For details about system properties, see 3.1.6 Setting system properties.

For details about the user properties, see (d) Values to be specified in the info argument (specifying the user properties) in (2) Connecting to the HADB server with the getConnection method in 7.3.1 Using the getConnection method of the DriverManager class to connect to the HADB server.

For details about the URL connection properties, see (a) Values to be specified in the url argument (specifying the URL for the connection) in (2) Connecting to the HADB server with the getConnection method in 7.3.1 Using the getConnection method of the DriverManager class to connect to the HADB server.