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
