Vassilis Virvilis wrote: > The actual point is can a webservice (pojo) be notified on undeploy?
If you don't mind coupling to Spring then just implement ServletContextAware and DisposableBean. The former will cause Spring to inject the servlet context into your pojo (after calling the constructor but before it serves any requests), and latter defines a destroy() method that will be called when the web application shuts down. Alternatively you can get hold of the Spring ApplicationContext from your own listener by calling WebApplicationContextUtils.getWebApplicationContext(ServletContext), and from there you can get at your application beans and do whatever cleanup is necessary. Ian -- Ian Roberts | Department of Computer Science [email protected] | University of Sheffield, UK
