tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Tomcat and session management
Date Wed, 12 Sep 2001 15:57:03 GMT

On Wed, 12 Sep 2001 wrote:

> Date: Wed, 12 Sep 2001 14:44:27 +0200
> From:
> Reply-To:
> To:
> Subject: Tomcat and session management
> Hello,
> I like to have morre information about context management inside
> Tomcat server.

The source code is your best bet.  Details vary a lot by version as well,
so you need to be specific about which version you are talking about.

> Where is the context kept? Is it kept inside memory or
> is it written to some physical medium?

By default, sessions are kept in memory.  Various versions have various
work in progress to make sessions able to be stored in persistent

> If in my environment multiple
> Tomcat servers are handling client requests, how does he handle the
> context bacause sometimes the request for a client are received by
> server1 and another time the requests for another client are handled
> by server2. So is there context sharing?

Tomcat doesn't currently support distributed sessions in the manner you
describe.  Note, also, that the servlet specification *requires* servers
to serve all requests for a particular session, at a particular point in
time, from the *same* JVM.  If/when Tomcat supports this, you can only
migrate a session to a different server "in between" requests.

If you use the "load balancing" feature built in to the web connector
(one front end web server, many back-end Tomcat processes),
what happens is that the session id is dynamically modified to include a
host identifier as well.  Non-session-based requests are allocated
randomly to servers, but once you start a session it always goes back to
the same server.

> Where can I read more detailed information on this issue?
> Regards
> Walter

Craig McClanahan

> _______________________________________________________
> Walter Heestermans
> Technical Account Manager
> tel : ++32-(0)2-714.06.70
> fax: ++32-(0)2-714.06.80
> Visit our local web site at :
> _______________________________________________________

View raw message