To resolve this issue, I would like to propose the following changes:

 

1)      Make org.apache.cxf.jaxws.EndpointImpl stateful in that it remembers
once it has been stopped through the JAX-WS APIs Endpoint.stop() method.
Trying to republish would result in an IllegalStateException per the JAX-WS
API.

2)      Add a destroy method to the ManagedEndpoint that will permanently
stop an Endpoint, unregister the MBean, and clean up anything else needed
such as the Endpoint's Server if needed.  This new method would delegate to
a new destroy method on the Server managed by the MBean and possibly to a
destroy method on any other CXF constructs that are involved.

3)      Wire org.apache.cxf.jaxws.EndpointImpl.stop() to the destroy method
of the Server it created such that this action thoroughly cleans up after
itself.

 

The goals here are to:

1)      Honor the JAX-WS API more completely

2)      Keep the existing MBean methods and Server start()/stop() methods
functioning as they do now

3)      Provide better cleanup when JMX is in use to allow applications that
programmatically manage Web service lifecycles to have accurate
management/monitoring data.

 

I'm sure I am missing some nuances of the lifecycle and listeners at the Bus
level so please let me know what else needs to be considered.  I know that I
haven't included any consideration of the ServerRegistryImpl and its role in
the Bus lifecycle so far.  I've also come at this from the SOAP Web service
perspective so any info on how the affected classes are used differently in
other parts of CXF would be helpful as well.

 

 

Reply via email to