This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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?
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
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