• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Distributed Web Application

 
Amit Khurana
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is mentioned in the API of ServletContext :
�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. �

Q: What is the exact meaning of �Distributed Web Application�. Does it mean a part of the one web application will be available on one server and other part of the same application will be available on other server? I am under the impression that whole application will be deployed on more than one server and the load distributor judges which server is comparatively free and forward the request to that WebServer. And in this situation every webserver has its own instance of ServletContext , which is initially populated with the data from the web.xml. Any further caching done in the application will work in the same manner as a application is deployed on one server. Like we have the clause like
If(getServletConfig().getServletContext().getAttribute(�XYZ�) = = null)
getServletConfig().getServletContext().setAttribute(�XYZ�,�xyz�);

Will somebody please elaborate me the exact meaning of the Distributed web Application?
 
Faisal Khan
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amit,
You have hit the nail on the head of what distributed webapps are. It is where the webapp is using clustered servers for scalability and performance.
HTH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic