• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why is this only specific to sessions?

 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Sudhakar Duraiswamy
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any reasons?
 
Ankit Garg
Sheriff
Posts: 9529
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you see any real life use of a HttpRequestBindingListener or ServletContextBindingListener??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic