6.6.1 J2EE server settings
Implement the settings of J2EE server in Easy Setup Definition file. Specify the definitions of the database session failover functionality in the <configuration> tag of a logical J2EE server (j2ee-server) in the Easy Setup definition file.
The following table describes the definitions of the database session failover functionality in Easy Setup definition file.
Item |
Parameter to be specified |
Settings |
Reference location |
---|---|---|---|
Setting of the database session failover functionality |
webserver.dbsfo.enabled |
Set in the unit of J2EE server whether to use the database session failover functionality. |
-- |
Specifying optional name of DB Connector |
webserver.dbsfo.connector.name |
Specify optional name of DB Connector to be set in DB Connector. For details on setting optional name of DB Connector, see 6.6.4(2) Specifying optional name of DB Connector. |
-- |
Setting maximum size of HTTP session attribute information that you can include in global session information |
webserver.dbsfo.attribute_data_size.max |
Set maximum size of HTTP session attribute information that you can include in global session information. |
-- |
Setting of functionality for estimating the size of HTTP session attribute information |
webserver.dbsfo.check_size.mode |
Set whether to use functionality for estimating the size of HTTP session attribute information. |
-- |
Setting integrity mode |
webserver.dbsfo.integrity_mode.enabled#1 |
Set whether to enable integrity mode of the database session failover functionality. |
-- |
Setting memory used in serialize processing |
-- |
Consider the memory used in serialize processing and perform tuning of JavaVM#2. |
-- |
Setting of inhibiting the database session failover functionality by using extension |
webserver.dbsfo.exclude.extensions |
If you want to use the database session failover functionality in the unit of J2EE server, set the extensions that inhibit database session failover functionality. |
-- |
Setting of Inhibiting the database session failover functionality in the unit of URI |
webserver.dbsfo.exclude.uris |
If you want to use the database session failover functionality in the unit of J2EE server, set the URIs that inhibit the database session failover functionality. |
(1) |
Setting refer-only requests |
webserver.dbsfo.session_read_only.uris |
Set URI to be treated as refer-only requests. |
(2) |
Setting server ID addition functionality of HttpSession |
|
Set server ID addition functionality of HttpSession. Set different values as server IDs for each replicated J2EE server. #3 |
-- |
Setting if pending queues are insufficient when using the functionality for controlling the number of concurrent execution threads |
webserver.dbsfo.thread_control_queue.enabled |
When the functionality that controls the number of concurrent execution threads in the unit of a Web application is enabled, set operations to be performed when free space in pending queues is insufficient. |
-- |
Setting of processing of starting a Web application when negotiation fails |
webserver.dbsfo.negotiation.high_level |
Set whether to continue or cancel the processing of starting a Web application when negotiation fails. |
-- |
Setting of exceptions thrown when using HTTP session in the requests targeted for inhibiting the database session failover functionality |
webserver.dbsfo.exception_type_backcompat |
Set exceptions to be thrown when using HTTP session in the requests targeted for inhibiting the database session failover functionality. |
-- |
For details on the Easy Setup definition file and parameters to be specified, see 4.3 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.
- Organization of this subsection
(1) Settings for inhibiting th database session failover functionality
This subsection describes how to specify a URI when inhibiting the database session failover functionality in the unit of URI.
(a) For specifying URI
Specify a URI, which includes the context path and starts with the forward slash (/). Do not include path parameter, query, or fragment. Note that you cannot use a semicolon (;) in URI of set values.
If you want to specify multiple URIs, separate them with semicolons (;).
(b) Exact match specification and prefix match specification
You can specify by using one of the following methods:
- Exact match specification
-
The specified URI is targeted for inhibiting the database session failover functionality only if it exactly matches with the request URI.
Specification example (in the case of Easy Setup definition file)
: configuration logical-server-typej2ee-server/logical-server-type param param-namewebserver.dbsfo.exclude.uris</param-name> param-value/examples/test/TestServlet;/examples/test2/TestServlet2/param-value /param configuration :
In this example, the following request URIs are targeted for inhibiting the database session failover functionality:
-
http://host/examples/test/TestServlet
-
http://host/examples/test/TestServlet?name=value
-
http://host/examples/test/TestServlet;gsessionid=XXXXXXXXXX
-
- Prefix match specification
-
If request URI and prefix match, it is targeted for inhibiting the database session failover functionality.
Specification example (in the case of Easy Setup definition file)
: configuration logical-server-typej2ee-server/logical-server-type param param-namewebserver.dbsfo.exclude.uris/param-name param-value/examples/*/param-value /param configuration :
In this example, the following request URIs are targeted for inhibiting the database session failover functionality:
-
http://host/examples/test/TestServlet
-
http://host/examples/dbsfo/DbsfoServlet?name=value
Note that URI specification must end with the forward slash and an asterisk (/*) in the case of prefix match specification. For example, if you specify the following URI, it is considered for exact match specification and not for prefix match specification.
-
/examples/test*
-
(c) Normalizing URI
URIs to be targeted for inhibiting the database session failover functionality must be specified after normalizing. If you specify a URI that is not normalized, the KDJE34341-W message is output and the corresponding URI is not targeted for inhibiting.
An example of normalized URI is:
-
/examples/test/servlet/TestServlet
Examples of URIs that are not normalized, are as follows. These URIs are not targeted for inhibiting.
-
/examples/test/jsp/../servlet/TestServlet
-
/examples/test/./servlet/TestServlet
(d) Mapping with URL encode
If you specify a URL encoded URI as a target for inhibiting, requests of URL encoded URL that match with the specified URI, are targeted for inhibiting the database session failover functionality. Similarly, if you specify a URI for which URL encoding is not performed, requests of URL, for which URL encoding is not performed, are targeted for inhibiting the database session failover functionality.
However, if you use URI decode functionality, whether the target URL is to be targeted for inhibiting the database session failover functionality according to URI is determined after decoding is performed. Hence, if a URL encoded URL matches with the URI specified as a target of inhibiting, the URL is targeted for inhibiting the database session failover functionality in the unit of URI.
The following table describes URLs that are targeted for inhibiting depending on 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 inhibit |
Does not inhibit |
Inhibits |
Does not inhibit |
Not encoded |
Inhibits |
Inhibits |
Does not inhibit |
Inhibits |
(e) Notes on URI specification
URIs that are set for inhibiting the database session failover functionality by URI, are not checked in negotiation. Therefore, check that URIs set on each J2EE server are the same.
(2) Specifying refer-only requests
This subsection describes how to specify a URI when setting refer-only requests.
(a) Specifying URI
Specify a URI that includes the context path and starts with the forward slash (/). Do not include path parameter, query, or fragment. You can specify up to 512 characters. Note that you cannot use a semicolon (;) in URI of set values.
If you want to specify multiple URIs, separate them with semicolons (;).
(b) Exact match specification and prefix match specification
You can specify by using one of the following methods:
- Exact match specification
-
Only if the specified URI exactly matches with the request URI, it becomes a refer-only request.
Specification example (in the case of Easy Setup definition file)
: configuration logical-server-typej2ee-server/logical-server-type param param-namewebserver.dbsfo.session_read_only.uris/param-name param-value/examples/test/TestServlet;/examples/test2/TestServlet2/param-value /param configuration :
In this example, the following request URIs become refer-only requests:
-
http://host/examples/test/TestServlet
-
http://host/examples/test/TestServlet?name=value
-
http://host/examples/test/TestServlet;gsessionid=XXXXXXXXXX
-
- Prefix match specification
-
If the prefix matches with the request URI, it becomes a refer-only request.
Specification example (in the case of Easy Setup definition file)
: <configuration> logical-server-typej2ee-server/logical-server-type param param-namewebserver.dbsfo.session_read_only.uris/param-name param-value/examples/*/param-value /param configuration :
In this example, the following request URIs become refer-only requests:
-
http://host/examples/test/TestServlet
-
http://host/examples/dbsfo/DbsfoServlet?name=value
Note that URI specification must end with the forward slash and an asterisk (/*) in the case of prefix match specification. For example, if you specify the following URI, it is considered for exact match specification and not for prefix match specification.
-
/examples/test*
-
(c) Normalizing URI
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/test/servlet/TestServlet
Examples of URIs that are not normalized, are shown below. These URIs do not become refer-only requests.
-
/examples/test/jsp/../servlet/TestServlet
-
/examples/test/./servlet/TestServlet
(d) Mapping with URL encode
If you specify a URL encoded URI as a refer-only request, the request of URL encoded URL tjat matches with the specified URI, becomes a refer-only request. Similarly, if you specify a URI that is not to be URL encoded, the 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 a URL encoded URL matches with the URI specified as a refer-only request, the URL becomes a refer-only request in URI unit.
The following table describes URLs that become refer-only requests depending on 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 |