It's not going to be available to anything outside its class with the stated
signature, static or not.

Mark

-----Original Message-----
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com]
Sent: Friday, November 01, 2002 4:45 PM
To: Struts-User
Subject: [OT] static vs. application scope


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

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