aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Why is this only specific to sessions? 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 "Why is this only specific to sessions?" Watch "Why is this only specific to sessions?" New topic
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
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

Do you see any real life use of a HttpRequestBindingListener or ServletContextBindingListener??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why is this only specific to sessions?
 
Similar Threads
Related to Session and Request objects
Problem with valueUnbound() of HttpSessionBindingListener
get all Session ?
Binding user objects to request,session,pagecontext, application
Faces Context null in serveResource Request