jQuery in Action, 2nd edition*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question on attributes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question on attributes" Watch "Question on attributes" New topic

Question on attributes

Sandya Bhaskara
Ranch Hand

Joined: Aug 20, 2004
Posts: 73
page 255 of HFS says that in distributed applications http session objects and attributes move from one VM to another .servlet context/servletcontext attributes are replicated...i have a question...what happens if the attributes of servletcontext/configuration are changed in one virtual machine... will that affect the servletcontext attributes in a different virtual machine(will they be changed too)?

Sandy<br />SCJP1.4 SCWCD1.4<br />SCBCD(preparing)
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Can ServletContext values be changed at all?

Sandya Bhaskara
Ranch Hand

Joined: Aug 20, 2004
Posts: 73
i'm talking about the servletcontext attributes....u can set and get the attributes...so in distributed applications if u set the servletcontext attributes on one VM will the servletcontext attributes on a different VM change?
Bahadar Khan
Ranch Hand

Joined: Jun 19, 2003
Posts: 81
ServletContext is duplicated per JVM. This implies that each VM should have its own ServletContext and no doubt each Context will have same context parameters but as there is one Context per VM, so any attribute change in one VM shouldn't be available to another VM. There seems a possibility that ContextListeners may be implemented in such a way that each change should trigger an event so the ServletContext's in other VM should update their attribute list. This is I THINK..but not sure. Hope somebody might shed a light on this subject. But definitly a very intelligent question.
I agree. Here's the link: http://aspose.com/file-tools
subject: Question on attributes
Similar Threads
Two JVM's on a single Jboss
How many ServletContext's can exist in a web application?
Difference. between ServletContext and Session Attributes
Number of online users
question on servlet contexts