struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: ServletContext, Initialisation, & Distributed Environments
Date Wed, 15 Dec 2004 19:46:07 GMT
On 12/14/2004 12:32 PM Andrew Hill wrote:
> According to the sevlet spec: "context attributes are local to the JVM 
> in which they were created. This prevents ServletContext attributes from 
> being a shared memory store in a distributed container".
> What Id like to know is how this affects configuration information I 
> load in a PlugIn or in a servlets init method when the application 
> starts up. If there are multiple JVMs, each will get its own instance of 
> the same servlet (which presumably is marked as load on startup), so 
> will init be called on each of them? or just for one machine?
> Im guessing the former, as the latter seems dodgy, but Id like to hear 
> it from someone who actually knows for sure.

Well I've never had to cluster any application but since no-one else 
answered, here's my input, since I'm interested.

Correct me if I'm wrong, but doesn't the servlet context contain the 
request, the response and the session? I don't know what generic context 
attributes are. I guess your answer lies therein.

I would also guess that each servlet container calls the init method on 
every servlet. Do you have a clustered test environment to test it with 
some logging statements?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message