I have some resources that I allot to create my web service, which I need to release How can I execute the code, for example (called flush and close file stream when the servlet is shutting down), the JAX-WS servlet is called the Destroy ()
method, for example.
I suggest using a ServletContextListener
for this. Write a custom implementation of the interface you want, and then click it in web.xml
in and lt; Listenener & gt; Hook it using the
element ().
This life cycle is not exactly matched with the servlet, but it should be sufficient for your purposes.
Comments
Post a Comment