You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Richards, Wayne" <Wa...@daon.com> on 2010/02/25 06:19:56 UTC

Catching shutdown of a web service

I am new to CXF. I have a web service up and running with multiple
methods/services available. I need to be able to catch the termination
of the web service to do some cleanup of objects. I cannot see how this
is done. Does anyone have any experience in doing this?

Cheers

Wayne


Re: Catching shutdown of a web service

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi

For JAXWS you probably can register a custom ServiceFactory (I think the one is actually available in CXF which can deal with 
prototypes), similarly for JAXRS. Please check the users list for the info about using Service factories with jaxws endpoints, I 
think Dan was replying a couple of months before...

cheers, Sergey

----- Original Message ----- 
From: "Richards, Wayne" <Wa...@daon.com>
To: <us...@cxf.apache.org>
Sent: Thursday, February 25, 2010 5:19 AM
Subject: Catching shutdown of a web service


I am new to CXF. I have a web service up and running with multiple
methods/services available. I need to be able to catch the termination
of the web service to do some cleanup of objects. I cannot see how this
is done. Does anyone have any experience in doing this?

Cheers

Wayne



Re: Catching shutdown of a web service

Posted by Daniel Kulp <dk...@apache.org>.
On Thu February 25 2010 12:19:56 am Richards, Wayne wrote:
> I am new to CXF. I have a web service up and running with multiple
> methods/services available. I need to be able to catch the termination
> of the web service to do some cleanup of objects. I cannot see how this
> is done. Does anyone have any experience in doing this?

The Bus holds onto a ServerLifeCycleManager where you can register a listener 
for events relating to the starting/stopping of services.     That may be all 
that is needed.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog