Given that it is now impossible to shutdown and jaxws:endpoint I propose adding 
a shutdown() method to org.apache.cxf.jaxws.EndpointImpl

The method would look like this:

public void shutdown() {
        Server server = getServer();
        server.shutdown();
}

This method could then be set as the destroy() method for the jaxws:endpoint 
bean in the EndpointDefinitionParser class.

-----Original Message-----
From: Soltysik, Seumas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 5:39 PM
To: [email protected]
Subject: Shutting down jaxws:endpoint


I am using the jaxws:endpoint in a spring.xml file and I am using my own 
ApplicationContext to launch the endpoints. I am able to do this successfully 
and launch the endpoints and invoke on the endpoints, however, when I call 
context.close(), I don't believe that the endpoinst are being shutdown. I 
noticed in the EndpointDefinitionParser that there is an init method 
specified(publish()) for the jaxws:endpoint bean but no destroy method is 
specifed. This seems like a problem since this means context.close() is not 
calling a destroy method on the EndpointImpl class. Should EndpointImpl have a 
destroy method which calls something like ServerImpl.shutdown(). Or perhaps, 
the destroy method could get a handle on the Endpoint bus and call shutdown() 
on it.

On a somewhat related note, is it possible to specify create a Bus in Spring 
and then associate that Bus with the creation of a jaxws:endpoint? This could 
provide a convenient way to manage the shutdown of endpoints. By associating a 
Bus with a set of jaxws:endpoints and specifiying Bus.shutdown() as the spring 
destroy() method for the Bus bean, you could ensure the endpoints were in fact 
shutdown.

Regards,
Seumas

Reply via email to