tomcat-dev mailing list archives

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


On Wed, 12 Sep 2001 walter.heestermans@necknet.com wrote:

> Date: Wed, 12 Sep 2001 14:44:27 +0200
> From: walter.heestermans@necknet.com
> Reply-To: tomcat-dev@jakarta.apache.org
> To: tomcat-dev@jakarta.apache.org
> 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
mechanisms.

> 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
> COGNICASE Benelux NV/SA
> tel : ++32-(0)2-714.06.70
> fax: ++32-(0)2-714.06.80
> mailto:walter.heestermans@cognicase.be
> Visit our local web site at :
> http://www.cognicase.be
>
> http://www.COGNICASE.be/AdvancedWeb
> _______________________________________________________
>
>


Mime
View raw message