!--a11y-->
Destroying Servlet Instances 
Servlets are removed from the service by the Web Container calling their destroy() method. This releases the instance of the servlet. There are different reasons for a servlet to be finalized – the application is about to be stopped, the servlet has thrown unavailable exception and so on.
The Web Container
provides a timeout period before it actually calls the
destroy() method of the
servlet. This gives any long-running threads executing the service method of
the servlet the opportunity to complete their work. The timeout is specified
using the DestroyTimeOut property of the Web
Container Service. For more information on how to set the timeout, see
Specifying
Servlet Execution Destroy Timeout in the Administration Manual.