You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Glen Daniels <gd...@macromedia.com> on 2002/05/06 21:34:32 UTC

RE: can you register a service to be notified when container is s hut down?

JAX-RPC specs a ServiceLifecycle interface which contains init(Object context) and destroy().  So you just have your service object implement ServiceLifecycle, and init()/destroy() will be called appropriately.

I've just implemented this functionality in Axis for request, session, and application scoped objects.  As soon as I confirm that the tests still pass, I'll check it in.

--Glen

> -----Original Message-----
> From: Andrew Vardeman [mailto:andrewv@iastate.edu]
> Sent: Monday, May 06, 2002 12:57 PM
> To: axis-user@xml.apache.org
> Subject: can you register a service to be notified when container is
> shut down?
> 
> 
> Howdy.
> 
> anyone know what happens when the container gets shut down?  
> I have an 
> application-scoped service that ideally would have a chance 
> to release 
> resources before it is obliterated.  Do the Axis APIs provide 
> some sort of 
> servlet container shutdown listener?  Or is there a method I 
> can add to my 
> service, like destroy(), that will be called when the main 
> Axis servlet's 
> destroy() method is called?
> 
> Andrew
> 
>