You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/05/19 20:37:47 UTC

DO NOT REPLY [Bug 33910] - Finalizers sometimes do not get run before instance stopped

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33910>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33910





------- Additional Comments From fredrik.westermarck@mdh.se  2005-05-19 20:37 -------
> Without this support it seems that objects with finalizers will not get their 
> finalizers executed when the container destroys the application instance.  Is 
> there any reason why this support would not be provided?

You could use a ServletContextListener [1] in your application to detect when an
application is initialized or destroyed by the container. That way you will be
able to perform the necessary initialization and cleanup in your application
depending on the event.

[1]
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org