Browse Prior Art Database

A Task-Based Method and System for Session Data Management in a Web Application

IP.com Disclosure Number: IPCOM000097976D
Original Publication Date: 2005-Mar-07
Included in the Prior Art Database: 2005-Mar-07
Document File: 1 page(s) / 54K

Publishing Venue

IBM

Abstract

A web application typically maintains user state within a session object. As a user navigates within an application, different components in that application store and retrieve data from the session object. Unfortunately, data often remains in the session even when no longer necessary. This remnant data can increase memory usage and lead to incorrect behavior by the application. To address this problem, consider the web application as consisting of a set of tasks. At the end of each task, all of the data put into the session for that task should be removed. To accomplish this, put a wrapper around the session object that records which data is put into the session. At the end of each task, tell the wrapper to clean the session. This technique allows session memory management to remain transparent to the programmer; the programmer simply has to access the session through the wrapper. Furthermore, this technique provides a method for automatically determining what data can be removed from the session and clearly defines when that data will be removed.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 78% of the total text.

Page 1 of 1

A Task-Based Method and System for Session Data Management in a Web Application

Disclosed is a method and system for garbage collecting data stored within a user session object in a web application. Consider the web application as consisting of a set of tasks. At any given time, only the data for the current task should be in the session. When a task completes, all data put into the session to support that task should be removed. To accomplish this, utilize a SessionWrapper that encapsulates the actual session object and provides the following:

    A set dataAddedToSessionSet: Contains the IDs for all data put in the session.

    A method putDataInSession(ID id, Data d): Puts the given Data d in the session with the ID id, and adds id to dataAddedToSessionSet.

    A method getDataFromSession(ID id): Retrieves the data from the session with the ID id.

    A method removeDataFromSession(ID id): Removes the data in the session with the ID id.

    A method clearDataInSession(): Invokes the method removeDataFromSession(ID id) on each ID in dataAddedToSessionSet.

At the beginning of each task in the web application, obtain a new SessionWrapper. Throughout the task, all accesses to data in the session are performed through the SessionWrapper. When the task completes, invoke the method

clearDataInSession() to remove all of the data for that task.

The manner in which to identify the start and end of a task depends entirely on how tasks are represented in each particular web application. One...