Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how a container persists session?

 
Michael Zhao
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic