| Author |
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?
|
Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
|
 |
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.
|
 |
 |
|
|
subject: Question on attributes
|
|
|