Hitachi

uCosminexus Application Server Expansion Guide


6.4.4 Listeners that operate in association with events occurring in the database session failover functionality

When using the database session failover functionality, the sessionDidActivate() method in the javax.servlet.http.HttpSessionActivationListener interface is invoked when inheriting of a global session occurs. In that case, the sessionCreated() method in the javax.servlet.http.HttpSessionListener interface is not invoked.

With processing using an HTTP session, the listeners associated with the HTTP session corresponding to events stipulated in Java EE operate. Listeners associated with an HTTP session are the classes that implement the following interfaces:

When using the database session failover functionality, listeners associated with an HTTP session operate with events in the database session failover functionality as key factors.

The following table describes mapping among events stipulated in Java EE, events that occur in the database session failover functionality, and listeners that operate with events as key factors.

Table 6‒13: Events that occur in the database session failover functionality and listeners to be operated

Sr. No.

Event stipulated in Java EE

Corresponding event (when using the database session failover functionality)

Listener that operates

1

Creating an HTTP session

Creating an HTTP session

The sessionCreated() method in the javax.servlet.http.HttpSessionListener interface

2

Disabling an HTTP session

  • Disabling an HTTP session

  • Stopping a Web application

  • The sessionDestroyed() method in the javax.servlet.http.HttpSessionListener interface

  • The attributeRemoved() method in the javax.servlet.http.HttpSessionAttributeListener interface#

  • The valueUnbound() method in the javax.servlet.http.HttpSessionBindingListener interface#

3

Adding HTTP session attributes

Adding HTTP session attributes

  • The attributeAdded() method in the javax.servlet.http.HttpSessionAttributeListener interface

  • The valueBound() method in the javax.servlet.http.HttpSessionBindingListener interface

4

Changing HTTP session attributes

Changing HTTP session attributes

The aattributeReplaced() method in the javax.servlet.http.HttpSessionAttributeListener interface

5

Deleting HTTP session attributes

  • Deleting HTTP session attributes

  • Stopping a Web application

  • The attributeRemoved() method in the javax.servlet.http.HttpSessionAttributeListener interface

  • The valueUnbound() method in the javax.servlet.http.HttpSessionBindingListener interface

6

Activating a session

Inheriting global session

The sessionDidActivate() method in the javax.servlet.http.HttpSessionActivationListener interface

7

Deactivating a session

(no corresponding event)

(No listener operates)

# Case when attributes were added when the event occurred.

Other listeners operate in the same way as cases in which the database session failover functionality is not used.