But how can I add this thing per servlet?
I'm having a servlet (or context) that opens a DB connection when started and need to close it when it is done. Can't I add a close() function to the context/servlet? this should be changed IMHO.

Geoffrey Talvola <gtalvola@nameconnector.com> wrote:
Meh Lounge wrote:
> Can anyone please provide me with such function. How
> can I order webware to do thing when a servlet or when
> a context is closed?

You can call Application.addShutDownHandler(func) where func is any callable
object. It will be called when the app server is shut down.

- Geoff


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Do you Yahoo!?
vote.yahoo.com - Register online to vote today!