You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by wa...@necknet.com on 2001/09/12 14:44:27 UTC

Tomcat and session management

Hello,

I like to have morre information about context management inside Tomcat server. Where is the context kept? Is it kept inside memory or is it written to some physical medium? 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?

Where can I read more detailed information on this issue?

Regards
Walter

_______________________________________________________
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
_______________________________________________________


Re: Tomcat and session management

Posted by "Craig R. McClanahan" <cr...@apache.org>.

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
> _______________________________________________________
>
>