Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ambiguity in VM concept-HFJ

 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am not able to understand the ambiguity in HFJ book Ch 6,page 255.
On one side it says that "There is one ServletContext per VM and one ServletConfig per servlet per VM" and in the diagram it states that Each servlet has same 'ServletConfig' object in both the VMs and same Servlet Context object also !
Doesnt it mean the opposite?
Even the HttpSession object is shown different on different VMs and it actually says that Session object is only one for a given session id per webapp regardless of the fact that the application is distributed accross multiple VMs?

Please clear this point !!!
 
Milton Ochoa
Ranch Hand
Posts: 336
Firefox Browser Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will try explain,

A WebApp can be on a Server or on Multiple Server.

(Server = Container)

Normally, only exist one ServletContext for WebApp, but on on Distribuit Enviroment (where the WebApp is across multiples server), for each one server, will exist one ServletContext, that mean, if on the Distribuit Enviroment are 4 Container then, will exist 4 ServletContext. That is clear?

The same if for each servletConfig and Servlet of the app.

The only that exist on One moment is the session, On the entire application, only exist one Session Object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic