• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ServletContext in a Clustered environment

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

I read Marty Hall's SCWCD Exam review in SCWCD links in javaranch site

I read the following paragraph in page 15

� Presumably they mean "in a distributed Web app." The
point is that the servlet context and sessions are
guaranteed to be shared in a Web app running on a
distributed (clustered) server. But, listener instances have
no such guarantee, so they cannot store data in their
instance variables (fields). Same goes for instance
variables of servlets: not safe in distributed apps.


BUT AS I know that

In the case of a web application marked "distributed " in its deployment
descriptor, there will be one context instance for each virtual machine. In
this situation, the context cannot be used as a location to share global
information (because the information won 't be truly global). Use an external
resource like a database instead.


I think the sevlet context can not be shared in clustered environment

please correct me if I am mistaken ?

thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic