This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes relase resource in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "relase resource in servlet" Watch "relase resource in servlet" New topic
Author

relase resource in servlet

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 580
Servlet uses many resources in it ,when the session time out ,how to release the resource used in servlet? and how teh capture the same event
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63052
    
  69

Such as?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

How are you storing session-specific data in the servlet?
Rahul Nair
Ranch Hand

Joined: Dec 01, 2007
Posts: 138

For Session Time Out (i.e. session destroyed) event, you may implement HttpSessionListener and override the method sessionDestroyed to release acquired resources which are used in application/ servlet.

 
jQuery in Action, 3rd edition
 
subject: relase resource in servlet
 
It's not a secret anymore!