| Author |
Why is this only specific to sessions?
|
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
We know, that, objects can be bounded to session, request, and application. (leave the page for JSP), Why is it specific to session bounded objects to get notification, when they about to be added and removed to session (HttpSessionBindingListener)? There is HttpSessionActivationListener interface, to get notification when the session about to be migrate. But, why is this special to session? No other scopes(request, application) have this feature?
Thanks!
|
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
|
 |
Sudhakar Duraiswamy
Ranch Hand
Joined: Dec 20, 2007
Posts: 43
|
|
Well its the need that is the basis for features added.
My Logical inner voice says , that since its the session thats responsible for maintaining the state and available in memory for access (unlike request which gets destroyed immediately once its purpose is served), and available in thousands in server's memory (unlike servletcontext only one available for the entire application) one would need all the trackings that one can think of to efficiently maintain (adding /removing/updating/invalidating)session objects ensuring that the application is always performant
|
Sudhakar
SCJP 5.0 93%| SCWCD (prep. ongoing))
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
|
Any reasons?
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
Do you see any real life use of a HttpRequestBindingListener or ServletContextBindingListener??
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
 |
|
|
subject: Why is this only specific to sessions?
|
|
|