Details
Description
Hello,
after applying CAMEL-12980,
we're still facing an issue with a failing starting feature and the CXFServlet /services URL.
To reproduce :
- drop the attached JAR in deploy
- wait for bundle start and failure
- access /services URL : endpoint + WSDL are listed > is this an expected behaviour?
For further analysis, it seems to be something missing in camel-core :
When blueprint fails, the doStop() method is called :
https://github.com/apache/camel/blob/camel-2.20.1/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java#L3506
At that line, it tries to stop only the routes already started, but not the ones failing before filling routeStartupOrder List.
https://github.com/apache/camel/blob/camel-2.20.1/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java#L4041
One of this routes is a CxfConsumer which has already been instanciated, with a server creation :
https://github.com/apache/camel/blob/camel-2.20.1/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java#L69
Even with DefaultCamelContext.doStop(), the server is still started and available in /services.
Tried a fix by adding this line in DefaultCamelContext:3502 :
// fill all the routes to be stopped getRouteStartupOrder().addAll(routeServices.values().stream().map(this::doPrepareRouteToBeStarted).collect(Collectors.toList())); // stop route inputs in the same order as they was started so we stop the very first inputs first try { // force shutting down routes as they may otherwise cause shutdown to hang ...
And now the endpoint isn't available anymore.
But this fix isn't effective enough as getRouteStartupOrder() may have duplicates?
Thanks,
Attachments
Attachments
Issue Links
- is related to
-
CAMEL-13644 CxfConsumer - Should not create server in constructor
- Resolved
- links to