Description
In OSGi, when cxf-http-transport configuration get updated from ConfigAdmin service, we re-register cxf http transport Servlet with new configuration props, this can cause two same Servlet instances conflict, which in turn can cause error in pax-web like
-whiteboard - 3.0.7 | Registration skipped for [ServletWebElement{mapping=DefaultServletMapping{httpContextId=null,urlPatterns=null,initParams={},servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@cc5f977, alias=/api, servletNamecxf-osgi-transport-servlet}}] due to error during registration javax.servlet.ServletException: servlet already registered with a different alias at org.ops4j.pax.web.service.spi.model.ServerModel.addServletModel(ServerModel.java:121)[100:org.ops4j.pax.web.pax-web-spi:3.0.7] at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:206)[101:org.ops4j.pax.web.pax-web-runtime:3.0.7] at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:189)[101:org.ops4j.pax.web.pax-web-runtime:3.0.7] at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:174)[101:org.ops4j.pax.web.pax-web-runtime:3.0.7] at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:67)[101:org.ops4j.pax.web.pax-web-runtime:3.0.7] at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:61)[125:org.ops4j.pax.web.pax-web-extender-whiteboard:3.0.7] at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:254)[125:org.ops4j.pax.web.pax-web-extender-whiteboard:3.0.7] at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElements(WebApplication.java:232)[125:org.ops4j.pax.web.pax-web-extender-whiteboard:3.0.7] at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerHttpContext(WebApplication.java:223)[125:org.ops4j.pax.web.pax-web-extender-whiteboard:3.0.7] at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:162)[125:org.ops4j.pax.web.pax-web-extender-whiteboard:3.0.7] at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.serviceChanged(WebApplication.java:51)[125:org.ops4j.pax.web.pax-web-extender-whiteboard:3.0.7] at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService.bind(ReplaceableService.java:72)[125:org.ops4j.pax.web.pax-web-extender-whiteboard:3.0.7] at org.ops4j.pax.web.extender.whiteboard.internal.util.tracker.ReplaceableService$Customizer.addingService(ReplaceableService.java:87)[125:org.ops4j.pax.web.pax-web-extender-whiteboard:3.0.7]