aspose file tools*
The moose likes Servlets and the fly likes how  sessions are implemented on server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how  sessions are implemented on server" Watch "how  sessions are implemented on server" New topic
Author

how sessions are implemented on server

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

Can anyone please tell me how sessions are implemented on server like JRun, WebLogic, WebSphere or in general ?

Thanks & Regards,
Kumar.


RR Kumaran
SCJP 1.4
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12789
    
    5
A session (HttpSession) is a kind of collection object whose life cycle is managed by the servlet container. It consists of a collection (think Map) that holds Object references indexed by String keys, plus a bunch of bookkeeping variables that let it track the time of last access, send events to listeners, etc..
If the objects you add to a session are serializable, the servlet container will be able to write them out to disk to save memory.
If you want to dig into the detains, look at the source code for Tomcat.
Bill
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Read this article for a description of how we did shared sessions in WebSphere's earlier versions. Newer versions have more options and optimizations, but it's basically the same.

Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how sessions are implemented on server