Meaningless Drivel is fun!
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

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,

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

Joined: Mar 22, 2000
Posts: 13036
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.
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
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 Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
I agree. Here's the link:
subject: how sessions are implemented on server
It's not a secret anymore!