Can an Application Scope Variable be clustered?
Author: ras ras (http://www.jguru.com/guru/viewbio.jsp?EID=1184726), Jul 8, 2004…. Personally I wouldnt use the the ServletContext as a parking place for global variables – I see it as a place for holding information relevant for the application infrastructure (paths, datasource names etc) – not for the application logic. I would place the data as a static instance variable on the servlet! …Is there a reason not to store data that “doesn’t change often” in an application scope variable? How is it different from storing it in a static variable defined in a servlet? In a “production environment”, I believe a servlet (and hence the static variable) exists until the webapp is restarted. IMHO, the advantages of storing in a static variable is “lazy-loading”.
Related Questions
- Only part of my application was funded: a) the scope of my work was reduced; and/or b) the length of time for my award was cut. May I submit a new grant application for the unfunded aims?
- How do I share Portlet and HTTP Session without the use of Application scope?
- Can an Application Scope Variable be clustered?