aspose file tools*
The moose likes Servlets and the fly likes HttpSessionListener  J2EE 1.4 change Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpSessionListener  J2EE 1.4 change" Watch "HttpSessionListener  J2EE 1.4 change" New topic
Author

HttpSessionListener J2EE 1.4 change

Mukesh Mittal
Greenhorn

Joined: Dec 29, 2005
Posts: 16
In J2ee 1.4 Servlet Spec mentioned about HttpSessionListener sessionDestroyed() functioon

-- Its a Notification that a session is about to be invalidated

while in previous versions
Notification that a session was invalidated


What's the advantage of changing this?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Being notified before the session is invalidated gives you the opportunity to inpsect the session and its scoped variables prior to invalidation.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mukesh Mittal
Greenhorn

Joined: Dec 29, 2005
Posts: 16
Can you give one example in which we inspect before invalidate.I am still trying to understand practical use of this.

Can we denied invalidating based on certain condition in this function.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Originally posted by Mukesh Mittal:
Can you give one example in which we inspect before invalidate.I am still trying to understand practical use of this.


For example if you need the info in a session scoped variable in order to properly release a resource.

Originally posted by Mukesh Mittal:
Can we denied invalidating based on certain condition in this function.


No.
Mukesh Mittal
Greenhorn

Joined: Dec 29, 2005
Posts: 16
Thanks for the clarification.

 
 
subject: HttpSessionListener J2EE 1.4 change