Migrating Session Management

This topic describes how to migrate a IBM® WebSphere® Multichannel Bank Transformation Toolkit version 5.2 Session management to a WebSphere Multichannel Bank Transformation Toolkit version 8.0 Session management.

About this task

WebSphere Multichannel Bank Transformation Toolkit provides the Public static void markSessionExpired(HttpSession aSession) throws BTTSMException utility method in the com.ibm.btt.sm.CSSessionHandler class. After this method is called, the session is marked as expired and is removed at the end of operation. You need to call this method in the logoff operation. Then, the session context will be cleaned and the HTTP session object will be destroyed after you log off the application.

WebSphere Multichannel Bank Transformation Toolkit version 5.2 supports both the cookie=true and the cookie=false modes.
  • When cookie=true, the HttpSessionHandler object is used in the HttpSession that implements the HttpSessionBindingListener interface. When the HttpSession is invalidated, the endSession(sessionId) method is triggered.
  • When cookie=false, the WebSphere Multichannel Bank Transformation Toolkit channel is responsible for the session expiration. It uses a dedicated thread, CSSessionManager, to check the expired sessions regularly with the checkExpiredSessions() method. And it ends the expired WebSphere Multichannel Bank Transformation Toolkit session.

In WebSphere Multichannel Bank Transformation Toolkit version 8.0, only the cookie=true mode is supported. Session management is delegated to HttpSession. You must add the HttpSession listener in your WAR project for session management.

To migrate the cookie=false mode in WebSphere Multichannel Bank Transformation Toolkit version 5.2, you must migrate your old mechanism to the HttpSession timeout mechanism. Add the following HttpSession timeout listener in the web.xml file:
<listener>
<listener-class>com.ibm.btt.sm.TimeoutHandler</listener-class>
</listener>