Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1.10
-
None
-
None
-
Unknown
Description
if a new application conflicts with
an existing one, an Exception:
—
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
There is an endpoint already running on /test-application.
at
org.apache.cxf.jaxrs.JAXRSBindingFactory.addListener(JAXRSBindingFactory.java:86)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123)
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:206)
—
is raised, which is expected. The problem is that the already existing
application ceases to work in the bus.
Following sergeyb's advice I tried removing
server.destroy()
from the
catch(RuntimeException e) {}
block in JAXRSServerFactoryBean's create method. However there is a comment saying that that invocation is there to prevent leaks. Also, invocations to server.destroy() in other moments don't affect other existing applications in the bus.