IntelliJ Java IDE
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes how a container persists session? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "how a container persists session?" Watch "how a container persists session?" New topic
Author

how a container persists session?

Michael Zhao
Ranch Hand

Joined: Sep 19, 2000
Posts: 77
A container that migrates seesion between vms or persists sessions is required to notify all attributes bound to sessions implementing HttpSessionActivationListener.
does anyone know how to persist a session?


SCJP,SCWCD,SCMAD,OCP9I, SCEA
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
Hi Weishe,
as you probably know this is not a task for the programmer but for the container or the administration of the container.
Check Peter den Haans answers in this thread:
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=18&t=001072

Axel
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Indeed. Session persistence and distribution are left to the container - a web developer typically has no control over that process.
As regards to the mechanism, if the session is passivated purely to conserve memory then a popular and simple way to do that is to serialize it onto the filesystem. For session distribution, you can serialize it into a database CLOB field. I can imagine that you could also directly exchange serialized session information between containers over the network - does anyone know a container doing that?
- Peter
[ March 14, 2002: Message edited by: Peter den Haan ]
 
IntelliJ Java IDE
 
subject: how a container persists session?
 
Threads others viewed
HttpActivationListener question
HttpSessionActivationListener
Is HttpSessionActivationListener configured in DD?
HttpSessionActivationListener
HttpSessionActivationlistener
developer file tools