>>This will be available to *all* sessions -- since all sessions are
"hosted"
>>by the same VM (isn't that true -- or is that dependent on the container?)

In a clustered environment this would not be the case, with different
machines having their own version of the static member.

-----Original Message-----
From: David Graham [mailto:dgraham1980@;hotmail.com]
Sent: Saturday, November 02, 2002 05:48
To: [EMAIL PROTECTED]
Subject: Re: [OT] static vs. application scope


One difference is that business objects (or non-web objects) can get to the
static data but not the application context.

David


>From: "Sri Sankaran" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts-User" <[EMAIL PROTECTED]>
>Subject: [OT] static vs. application scope
>Date: Fri, 1 Nov 2002 16:45:24 -0500
>
>What is the difference between making a property available in application
>scope as opposed to making it static to a class?  As a simple (contrived)
>example, I want to maintain a mapping of car model and manufacturer.  This
>being, un-changing I could implement it as a static property of some class.
>
>public class SomeClass {
>   private static Map carInfo;
>}
>
>This will be available to *all* sessions -- since all sessions are "hosted"
>by the same VM (isn't that true -- or is that dependent on the container?).
>
>I could, alternatively, maintain such information in the servlet
>application context.
>
>What is the difference?
>
>Sri


_________________________________________________________________
Get a speedy connection with MSN Broadband.  Join now!
http://resourcecenter.msn.com/access/plans/freeactivation.asp


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to