uCosminexus Application Server, Web Container Functionality Guide

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

2.7.5 Setting the upper limit for the number of HttpSession objects

With Application Server, you can set an upper limit for the number of valid HttpSession objects.

Set the upper limit for HTTPSession objects as the property of the Web applications contained in a J2EE application. For details on the settings for the J2EE applications, see 2.7.7 Definition in cosminexus.xml.

Note
If the session failover functionality is applied to the Web applications, you must set the upper limit for the number of HTTP sessions when the following settings are made.
  • Settings for canceling the start processing of the Web application (webserver.dbsfo.negotiation.high_level key of the Easy Setup definition file) when the negotiation processing during the startup of the application fails.
In this case, if the upper limit is not set for the number of HTTP sessions, an error occurs when you start the Web application that inherits the session information and you cannot start the Web application. If you have specified the settings for continuing the startup processing of the Web application when the negotiation processing during the startup of the application fails, the settings of the upper limit of the number of HttpSession objects is optional.
For the session failover functionality, see 5.2 Overview of the session failover functionality in the uCosminexus Application Server Expansion Guide.
For the negotiation processing of the session failover functionality during the startup of a Web application, see 6.4.1 Processing at the time of starting an application in the uCosminexus Application Server Expansion Guide.
For the Easy Setup definition file and the parameters to be specified, see 4.6 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.
Reference note
When the size estimation functionality of the global session information is enabled, the upper limit for the number of HttpSession objects that is the prerequisite for the session failover functionality is not required to be specified. For the size estimation functionality of the global session information, see 6.5 Estimating the size of the global session information in the uCosminexus Application Server Maintenance and Migration Guide.
Organization of this subsection
(1) HttpSession objects for which upper limit is to be set
(2) Operations when the number of HttpSession objects exceeds the upper limit (Occurrence of exception)
(3) Operations when the number of HttpSession objects exceeds the upper limit (message output)

(1) HttpSession objects for which upper limit is to be set

The upper limit is set for enabled HttpSession objects.

Among the HttpSession objects acquired by the getSession method of the javax.servlet.http.HttpServletRequest interface, valid HttpSession objects implies the objects that satisfy the following two conditions:

(2) Operations when the number of HttpSession objects exceeds the upper limit (Occurrence of exception)

If the upper limit for the number of HttpSession objects is specified and if an attempt is made to generate HttpSession objects exceeding the specified upper limit, an exception occurs in the getSession method of the javax.servlet.http.HttpServletRequest interface. Depending on the settings, one of the following exceptions will occur:

Specify which exception will be thrown in the J2EE application parameters. For details on the settings for the J2EE applications, see 2.7.8(1) Setting up the J2EE server.

The HttpSession object is generated at the following timing in the Web Container:

If the HttpSession object generation process exceeds the specified upper limit, perform the following operations:

(3) Operations when the number of HttpSession objects exceeds the upper limit (message output)

If the upper limit for the number of HttpSession objects is specified and if an attempt is made to generate HttpSession objects exceeding the specified upper limit, the KDJE39225-E message is output to the log.

The message KDJE39225-E is output every time the request that uses HTTP session is executed, therefore, the log might be filled up with the same message. To restrain the repeated output of the same message, you can set the interval (output interval) for KDJE39225-E. Set the interval as required. This interval is applied to each Web application.

For the message output interval settings, see 2.7.8(1) Setting up the J2EE server.