uCosminexus Application Server, Expansion Guide
Implement J2EE Server settings in the Easy Setup Definition file. Specify the definitions of the EADs session failover functionality in the configuration tag of the logical J2EE Server (j2ee-server) in the Easy Setup definition file.
The following table describes the definitions of the EADs session failover functionality in the Easy Setup definition file:
Table 7-26 Definitions of the EADs session failover functionality in the Easy Setup definition file
| Category | Item | Parameter to be specified | EADs parameter | Settings |
|---|---|---|---|---|
| Specifying the EADs session failover functionality | Specifying the EADs session failover functionality | webserver.eadssfo.enabled | -- | Specify whether to use the EADs session failover functionality in the unit of J2EE server. |
| Specifying a cache name for the application information cache | webserver.eadssfo.application.cache.name | -- | Specify a cache name for the application information cache on the EADs server. | |
| Specifying a cache name for the session information cache | webserver.eadssfo.session.cache.name | -- | Specify a cache name for the session information cache on the EADs server. | |
| Specifying functionality for estimating the size of the HTTP session attribute information | webserver.eadssfo.check_size.mode | -- | Specify whether to use the functionality for estimating the size of HTTP session attribute information. | |
| Specifying the EADs session failover inhibition functionality | webserver.eadssfo.exclude.url_patterns | -- | Specify the URL pattern to inhibit the EADs session failover functionality, in the unit of J2EE server. For details on how to set, see (1) Settings of the EADs session failover inhibition functionality. |
|
| Specifying the refer-only requests | webserver.eadssfo.session_read_only.url_patterns | -- | Specify the URL pattern to be set as a refer-only request, in the unit of J2EE server. For details on how to set, see (2) Settings of refer-only requests. |
|
| Specifying the retry count for connecting to the EADs server | webserver.eadssfo.client.retry.count | -- | Specify the count of retries to be performed when access to the EADs server fails. | |
| Specifying the retry interval for connecting to the EADs server | webserver.eadssfo.client.retry.interval | -- | Specify the retry interval (milliseconds) when access to the EADs server fails. | |
| Specifying the EADs client#1 | Specifying the connection destination EADs server name | webserver.eadssfo.eads.client.node.list | eads.client.node.list | Specify a name for identifying the EADs server, which is to be connected in initial settings of the EADs client when starting a Web application. |
| Specifying the host name of connection destination EADs server | webserver.eadssfo.eads.client-connection-destination-EADs-server-name-address | eads.client-connection-destination-EADs-server-name-address | Specify the IP address or host name of the EADs server, which is to be connected in initial settings of the EADs client when starting a Web application. | |
| Specifying the port count of the connection destination EADs server | webserver.eadssfo.eads.client-connection-destination-EADs-server-name-port | eads.client-connection-destination-EADs-server-name-port | Specify the port of the EADs server, which is to be connected in initial settings of the EADs client when starting a Web application. | |
| Specifying the message log output destination of the EADs client | webserver.eadssfo.eads.logger.dir | eads.logger.dir | Specify the output destination directory for the message log, which is output by the EADs client. | |
| Specifying the size of the message log file of the EADs client | webserver.eadssfo.eads.logger.message.filesize | eads.logger.message.filesize | Specify the file size (bytes) of one file of the message log, which is output by the EADs client. | |
| Specifying the number of message log files of the EADs client | webserver.eadssfo.eads.logger.message.filenum | eads.logger.message.filenum | Set the number of files of the message log, which is output by the EADs client. | |
| Specifying the message log and standard log output of the EADs client | webserver.eadssfo.eads.logger.message.console.enable | eads.logger.message.console.enable | Specify whether to output the message log, which is output by EADs client, to the standard output | |
| Specifying the output of the message dump of the EADs client | webserver.eadssfo.eads.logger.commDump.enable | eads.logger.commDump.enable | Specify whether to output the message dump, which is output by the EADs client. | |
| Specifying the size of the communication trace file of the EADs client | webserver.eadssfo.eads.logger.commTrace.filesize | eads.logger.commTrace.filesize | Specify the file size (bytes) of one file of the communication trace, which is output by the EADs client. | |
| Specifying the number of communication trace files of the EADs client | webserver.eadssfo.eads.logger.commTrace.filenum | eads.logger.commTrace.filenum | Specify the number of files of the communication trace, which is output by EADs client. | |
| Specifying the output of the communication trace of the EADs client | webserver.eadssfo.eads.logger.commTrace.enable | eads.logger.commTrace.enable | Specify whether to output the communication trace, which is output by the EADs client. | |
| Specifying the size of the data sending and receiving buffer of the connection | webserver.eadssfo.eads.connection.buffersize | eads.connection.buffersize | Specify the sending and receiving buffer size (bytes) of the read and written data of connection. | |
| Specifying the maximum number of the connections to be pooled | webserver.eadssfo.eads.connectionPool.poolsize | eads.connectionPool.poolsize | Specify the maximum number of connections to be pooled for the same connection destination EADs server. | |
| Specifying the connection timeout | webserver.eadssfo.eads.connection.timeout | eads.connection.timeout | Specify the connection confirmation with the EADs server and monitoring time for data sending and receiving (milliseconds). | |
| Specifying the retry count for connection confirmation | webserver.eadssfo.eads.connection.retry | eads.connection.retry | Specify the count of retries to be performed when access fails during confirmation of the connection with the EADs server. | |
| Specifying the container extension library#2 | Specifying the container extension library | add.class.path | -- | Specify the JAR file, which is provided by the EADs client, as the container extension library for using the EADs client in the EADs session failover functionality. For details on how to specify the JAR file, see (3) Specifying the container extension library. |
For details on the Easy Setup definition file and parameters to be specified, see 4.6 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.
If you want to use the EADs session failover inhibition functionality, specify a URL pattern to inhibit the functionality in the Easy Setup definition file (J2EE server unit) or in cosminexus.xml (Web application unit).
The URL pattern specified in the Easy Setup definition file is the default value when setting in cosminexus.xml. The value specified in cosminexus.xml is preferred over the value specified in the Easy Setup definition file. However, if you omit specification of the tag value or specify a blank tag in cosminexus.xml, no URL pattern is set to inhibit the EADs session failover functionality. In that case, the URL pattern specified in the Easy Setup definition file is also not applied.
For details on the EADs session failover inhibition functionality, see 5.6.1 Inhibiting the session failover functionality.
There are three ways in which you can specify a URL pattern - exact match specification, prefix match specification, and extension match specification. Specify URI in exact match specification and prefix match specification. If you want to specify multiple URIs or extensions, separate the values with semicolons (;).
If you specify an invalid URL pattern in the Easy Setup definition file, KDJE34437-W is output when starting the J2EE server and the corresponding URL pattern is disabled. If you specify an invalid URL pattern in the property in cosminexus.xml, KDJE34437-W is output when starting the Web application and the corresponding URL pattern is disabled.
The specified URI is targeted for the EADs session failover inhibition functionality only if it exactly matches the request URI.
In exact match specification, specify a URI that does not include the context path and starts with a forward slash (/). Do not include path parameter, query, or fragment. Also, specify a normalized URI. Note that you cannot use semicolons (;) in URI of set values.
An example of specifying values in the Easy Setup definition file is as follows:
:
configuration
logical-server-type-j2ee-server/logical-server-type
param
param-name-webserver.eadssfo.exclude.url_patterns/param-name
param-value/test/TestServlet;/test2/TestServlet2/param-value
/param
configuration
:
In this example, the following request URI are targeted for the EADs session failover inhibition functionality:
The specified URI is targeted for the EADs session failover inhibition functionality if its prefix matches with the prefix of the request URI.
In prefix match specification, specify a URI that does not include the context path, starts with a forward slash (/), and ends with a forward slash and an asterisk (/*). Do not include path parameter, query, or fragment. Also, specify a normalized URI. Note that you cannot use semicolons (;) in URI of set values.
An example of specifying values in the Easy Setup definition file is as follows:
:
configuration
logical-server-type-j2ee-server/logical-server-type
param
param-name-webserver.eadssfo.exclude.url_patterns/param-name
param-value/test/param-value
/param
configuration
:
In this example, the following request URI are targeted for the EADs session failover inhibition functionality:
Note that if you specify a URI, such as the following URI, that does not end with a forward slash and an asterisk (/*), the URI is considered for exact match specification and not for prefix match specification.
/examples/test*
A URI is targeted for the EADs session failover inhibition functionality only if the specified extension exactly matches the request URI. In extension match specification, the extension specification must begin with an asterisk and a period (*.).
An example of specifying values in the Easy Setup definition file is as follows:
:
configuration
logical-server-type-j2ee-server/logical-server-type
param
param-name-webserver.eadssfo.exclude.url_patterns/param-name
param-value-*.html;*.jpg/param-value
/param
configuration
:
In this example, the following request URI are targeted for the EADs session failover inhibition functionality:
URL patterns to be targeted for the EADs session failover inhibition functionality must be specified in normalized URI.
An example of a normalized URI is:
Examples of URI that are not normalized are shown below. These URI are not targeted for inhibiting.
If you specify a URI that includes a URL encoded string, URI targeted for the EADs session failover inhibition functionality vary according to the enabled or disabled status of the URI decode functionality. The following table describes whether request URL are targeted for inhibition functionality according to the enabled/disabled status of the URI decoding functionality:
Table 7-27 Enabled/disabled status of URI decode functionality and targets of inhibition functionality
| Property set value |
Request URL | |||
|---|---|---|---|---|
| URI decode function enabled | URI decode function disabled | |||
| Encoded | Not encoded | Encoded | Not encoded | |
| Encoded | Does not inhibit | Does not inhibit | Inhibits | Does not inhibit |
| Not encoded | Inhibits | Inhibits | Does not inhibit | Inhibits |
For details on URI decode functionality, see 2.22 URI decode functionality in the uCosminexus Application Server Web Container Functionality Guide.
To set a refer-only request, specify a URL pattern to be handled as a refer-only request in the Easy Setup definition file (J2EE server unit) or in cosminexus.xml (Web application unit).
The URL pattern specified in the Easy Setup definition file is the default value when setting in cosminexus.xml. The value specified in cosminexus.xml is preferred over the value specified in the Easy Setup definition file. However, if you omit specification of the tag value or specify a blank tag in cosminexus.xml, no URL pattern is set for the refer-only request. In that case, the URL pattern specified in the Easy Setup definition file is also not applied.
For details on refer-only requests, see 5.6.2 Defining refer-only requests of HTTP session.
There are three ways in which you can specify a URL pattern - exact match specification, prefix match specification, and extension match specification. Specify URI in exact match specification and prefix match specification. If you want to specify multiple URI or extensions, separate the values with semicolons (;).
If you specify an invalid URL pattern in the Easy Setup definition file, KDJE34438-W is output when starting the J2EE server and the corresponding URL pattern is disabled. If you specify an invalid URL pattern in the property in cosminexus.xml, KDJE34438-W is output when starting the Web application and the corresponding URL pattern is disabled.
The specified URI becomes a refer-only request only if it exactly matches with the request URI.
In exact match specification, specify a URI that does not include the context path and starts with a forward slash (/). Do not include path parameter, query, or fragment. Also, specify a normalized URI. Note that you cannot use semicolons (;) in URI of set values.
An example of specifying values in the Easy Setup definition file is as follows:
:
configuration
logical-server-typej2ee-server/logical-server-type
param
param-name-webserver.eadssfo.session_read_only.url_patterns /param-name
param-value/test/TestServlet;/test2/TestServlet2/param-value
/param
configuration
:
In this example, the following request URI become refer-only requests:
If the prefix of the specified URI matches with the prefix of the request URI, it becomes a refer-only request.
In prefix match specification, specify a URI that does not include the context path, starts with a forward slash (/), and ends with a forward slash and an asterisk (/*). Do not include path parameter, query or fragment. Also, specify a normalized URI. Note that you cannot use semicolons (;) in URI of set values.
An example of specifying values in the Easy Setup definition file is as follows:
:
configuration
logical-server-type-j2ee-server/logical-server-type
param
param-name-webserver.eadssfo.session_read_only.url_patterns /param-name
param-value/test/*/param-value
/param
configuration
:
In this example, the following request URI become refer-only requests:
Note that if you specify a URI that does not end with a forward slash and an asterisk (/*) as the following URI, it is considered for exact match specification and not for prefix match specification:
/examples/test*
The specified extension only becomes a refer-only request if it exactly matches with the request URI. In extension match specification, extension specification must begin with an asterisk and a period (*.).
An example of specifying values in the Easy Setup definition file is as follows:
:
configuration
logical-server-type-j2ee-server/logical-server-type
param
param-name-webserver.eadssfo.session_read_only.url_patterns /param-name
param-value-*.html;*jpg/param-value
/param
configuration
:
In this example, the following request URI are targeted for the EADs session failover inhibition functionality:
A URI that you want to make a refer-only request must be normalized and specified. If you specify a URI that is not normalized, the KDJE34357-W message is output and the corresponding URI does not become a refer-only request.
An example of normalized URI is:
Examples of URI that are not normalized are shown below. These URI do not become refer-only requests.
If you specify a URL encoded URI as a refer-only request, a request of URL encoded URL that matches with the specified URI becomes a refer-only request. Similarly, if you specify a URI that is not to be URL encoded, a request of URL that is not URL encoded becomes a refer-only request.
However, if you use URI decode functionality, whether the target URL is a refer-only request according to URI is determined after decoding is performed. As a result, if the URL encoded URL matches with the URI specified as a refer-only request, it becomes a refer-only request in the URI unit.
The following table describes URLs that become refer-only requests according to the enabled/disabled status of URI decode functionality:
Table 7-28 URLs that become refer-only requests according to enabled/disabled status of URI decode functionality
| Property set value |
Request URL | |||
|---|---|---|---|---|
| URI decode function enabled | URI decode function disabled | |||
| Encoded | Not encoded | Encoded | Not encoded | |
| Encoded | Does not become a refer-only request | Does not become a refer-only request | Becomes a refer-only request | Does not become a refer-only request |
| Not encoded | Becomes a refer-only request | Becomes a refer-only request | Does not become a refer-only request | Becomes a refer-only request |
For details on URI decode functionality, see 2.22 URI decode functionality in the uCosminexus Application Server Web Container Functionality Guide.
You must specify the JAR file, which is provided by the EADs client, as the container extension library in the Easy Setup definition file for using the EADs client in the EADs session failover functionality.
An example of coding the Easy Setup definition file is as follows:
add.class.path=directory-in-which-EADs-client-is-placed\javaclient\lib\eads-client.jar add.class.path=directory-in-which-EADs-client-is-placed\javaclient\lib\eads-common.jar add.class.path=directory-in-which-EADs-client-is-placed\javaclient\lib\hntrlib2-eads-j.jar
All Rights Reserved. Copyright (C) 2013, 2015, Hitachi, Ltd.