uCosminexus Application Server, Expansion Guide

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

6.9.3 Environment settings of DB Connector

The database session failover functionality is used for implementing 24-hour continuous operation. In order to ensure that there is no impact on the system even if a failure occurs in a database, you must perform settings such as connection failure detection for implementing continuous operation. Consider the time required for recovery and set the value.

For details on connection failure detection, see 3.15.1 Detecting a connection failure in the uCosminexus Application Server Common Container Functionality Guide.

For details on properties to be set in DB Connector and setting methods, see 4.2.2 Defining properties of DB Connector in the uCosminexus Application Server Application Setup Guide.

This subsection describes the properties required to be set in a DB Connector.

Organization of this subsection
(1) Properties to be set in config-property tag
(2) Properties to be specified in property tag

(1) Properties to be set in config-property tag

This subsection describes the properties set in config-property for each database used. Settings of the database session failover functionality are not required for the properties that are not described in this section.

Note
If you want to use the database session failover functionality, you must set statement pooling. Statement pooling greatly affects memory usage of J2EE servers. Therefore, consider the connection pooling settings also and determine the value to be specified in the PreparedStatementPoolSize property.
For details on statement pooling, see 3.14.4 Statement pooling in the uCosminexus Application Server Common Container Functionality Guide. For details on connection pooling, see 3.14.1 Connection pooling in the uCosminexus Application Server Common Container Functionality Guide. For details on the values that you can specify in PreparedStatementPoolSize, see 4.1.10 Properties that you can specify in config-property tag to be set in DB Connector in the uCosminexus Application Server Application and Resource Definition Reference Guide. For details on memory size to be used per statement, see JDBC related documents.
(a) Properties to be set when using HiRDB

The following table describes properties to be set when using HiRDB.

Table 6-47 Properties to be set when using HiRDB

Value to be specified in the config-property-name tag Value to be specified in the config-property-type tag Contents or value to be specified in the config-property-value tag Mandatory/Optional
description java.lang.String Specify connection addition information required for connecting to a database. Mandatory
DBHostName java.lang.String Specify host name of HiRDB to be connected. Mandatory
loginTimeout java.lang.Integer Specify maximum waiting time (seconds) for establishing physical connection with HiRDB server when acquiring Connection objects by using the getConnection method. Optional
LONGVARBINARY_Access java.lang.String Specify LOCATOR. Mandatory
PreparedStatementPoolSize java.lang.Integer Specify the numeric value determined by 30 x number-of-Web-applications -on-a-J2EE-server-that-use -the-database-session-failover -functionality. Mandatory
CancelStatement java.lang.Boolean Specify true. Mandatory
logLevel java.lang.String Specify any level for the levels of log trace output by DB Connector. Optional

Legend:
Mandatory: Must be specified
Optional: Specify if required

Note
When using the database session failover functionality, if you set the following client environment definitions, you cannot continue normal operations. Use the default values as is.
  • PDISLLVL (Default value: 2)
  • PDFORUPDATEEXLOCK (Default value: NO)
For details on settings of client environment definitions, see the uCosminexus Application Server HiRDB UAP Development Guide.
(b) Properties to be set when using Oracle

The following table describes properties to be set when using Oracle.

Table 6-48 Properties to be set when using Oracle

Value to be specified in the config-property-name tag Value to be specified the in the config-property-type tag Contents or value to be specified in the config-property-value tag Mandatory/Optional
databaseName java.lang.String Specify a specific database name (SID) on Oracle server. Mandatory#
serverName java.lang.String Specify host name or IP address of Oracle server. Mandatory#
portNumber java.lang.Integer Specify a port number that listens to requests from Oracle server. Mandatory#
url java.lang.String Specify JDBC URL required by Oracle JDBC Thin Driver for connecting to a database. Mandatory#
loginTimeout java.lang.Integer Specify a timeout (units seconds) for connection trial to database. Optional
PreparedStatementPoolSize java.lang.Integer Specify the numeric value determined by 30 x <number of Web applications on a J2EE server that uses the database session failover functionality>. Mandatory
logLevel java.lang.String Specify any level for the levels of log trace output by DB Connector. Optional

Legend:
Mandatory: Must be specified
Optional: Specify if required

#
Specify all values of databaseName, serverName, and portNumber, or specify the value of url.

(2) Properties to be specified in property tag

The following table describes the properties to be set in the property tag. Settings of the database session failover functionality are not required for the properties that are not described in this section.

Table 6-49 Properties to be specified in the property tag

Value to be specified in the property-name tag Value to be specified in the property-type tag Value of the property-default-value tag Contents or value to be specified in the property-value tag Mandatory/Optional
MaxPoolSize int 10 Specify maximum value of connection pool#1. Mandatory
MinPoolSize int 10 Specify minimum value of connection pool#1. Mandatory
LogEnabled boolean true Specify true. Mandatory
User#2 String -- Specify a user name. Mandatory
Password String -- Specify a password. Mandatory
ValidationType int 1 Specify 1. Mandatory
RetryCount int 0 Specify connection acquisition retry count.
Specify a value, in accordance with the database settings and network environment that enables recovery of a database when a failure occurs.
Optional
RetryInterval int 10 Specify connection acquisition retry interval.
Specify a value, in accordance with the database settings and network environment that enables recovery of a database when a failure occurs.
Optional
RequestQueueEnable boolean true Specify true. Mandatory#3
RequestQueueTimeout int 30 Specify maximum value that can stop the queue waiting for connection acquisition when connections exhaust.#4 Mandatory#3
WatchEnabled boolean true Specify whether you want to enable connection pool monitoring. Optional
WatchInterval int 30 Specify connection pool monitoring interval. Optional
WatchThreshold int 80 Specify threshold value that monitors connection pool use status. Optional
WatchWriteFileEnabled boolean true Specify true. Optional

Legend:
Mandatory: Must be specified
Optional: Specify if required
--: None

#1
Calculate the value of the connection pool by using the formulas given below. Set the same value as the maximum and minimum value of the connection pool.
If you set number of concurrent execution threads in Web application unit or URL unit:
Sum of number of concurrent execution threads in a Web application that uses the database session failover functionality on a J2EE server + 2
If you set number of concurrent execution threads in J2EE server unit,
Number of concurrent execution threads in J2EE server + 2
If a J2EE server receives requests exceeding the maximum value of connection pools, those requests go to the state of waiting in a queue for acquiring connection, when connections exhaust.

#2
Register the creator of the table in the user set in DB Connector.

#3
These settings are not required if the functionality that controls the number of concurrent execution threads in the Web application unit, is disabled.

#4
Specify a value in the following range.
If you are using Web server integrated functionality,
1 < RequestQueueTimeout < A-timeout-for-receiving-data-from-the-Web-container-set-at-redirector-side
The timeout for receiving data from the Web container set at redirector side is the value specified in the worker. worker- name.receive_timeout key in the worker definition file.
If you are using in-process HTTP server functionality,
1 < RequestQueueTimeout