Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can an Application Scope Variable be clustered?

application clustered SCOPE
0
Posted

Can an Application Scope Variable be clustered?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123