| Author |
Behavior of ServletContext VS Behavior of HttpSession
|
Satyajeet Kadam
Ranch Hand
Joined: Oct 19, 2006
Posts: 202
|
|
|
please tell me the difference between the "Behavior of ServletContext" VS "Behavior of HttpSession" in Distributed Environment?
|
 |
nitin pai
Ranch Hand
Joined: May 30, 2006
Posts: 185
|
|
In a distributed environment, Each JVM will have a separate ServletContext. So you cannot depend on the Conetext level attributes while sharing attribute information But the Session object is shared between all the JVM's present in the environment. You can test this out by implementing the HttpSessionActivationListener on your attributes. The attributes will be passivated and then activated when they move from one server to another but in this case your attributes must be serializable.
|
|
 |
 |
|
|
subject: Behavior of ServletContext VS Behavior of HttpSession
|
|
|