Creating an HTTP-specific ChannelSessionHandler
Create an instance of the HttpChannelSessionHandler. The HttpChannelSessionHandler is a specialized ChannelSessionHandler that implements the HttpSessionBindingListener interface. The handler receives notification of the HttpSessionBindingEvent when the session is added to or removed from the servlet engine session manager (that is, WebSphere®). When the instance is created, the CSServer is added as a registered listener for the ChannelSessionStateChangedEvent.
The application must register to CSServer as a listener of the event. When an event is fired, the application may use the protocol available in the Context class to eventually remove session information from the application session table if the session has expired due to a timeout.
Configuring the servlet engine for inactivity timeouts
Configure the servlet engine implementation to enable sessions and set the invalidation time.
Creating an event class
Create an instance of the ChannelSessionStateChangedEvent, which uses the session ID obtained from the HttpSessionBindingEvent object. This object contains a reference to the HttpSession object that has expired. When the session expires, the ChannelSessionStateChangedEvent is fired to all registered listeners.
Implementing an event listener for the event class
Implement the ChannelSessionStateChangedEventListener. The CSServer implements this interface and is notified when the session is removed by the channel session manager. The CSServer is responsible for firing the CSInactivityClientEvent. The application must be a registered listener so that it can remove the session from the application session table and perform any other cleanup.