Repository navigation
Conversation
camel-cxf forced http-whiteboard (and therefore pax-web/Jetty) on every install, even though it's only needed for the OSGi Servlet Whiteboard-based CXF servlet registration (the "Available SOAP Services" listing page added in apache#687). Producer-only usage and consumer usage via another transport (camel-cxf-jetty, or a manually installed Undertow transport as already exercised by CamelCxfITest) never needed it. Move it into a new camel-cxf-whiteboard feature (camel-cxf + http-whiteboard), following the same pattern already used for camel-cxf-jetty and camel-cxf-spring, and add a Pax Exam integration test that installs the new feature and verifies it doesn't conflict with a CXF endpoint served over another transport.
HelloService only needs the echo operation this test invokes; the other members were copy-pasted from the camel-cxf/camel-cxf-jetty test HelloService and never called here. Also reference the already-declared port-property constant instead of re-hardcoding its string value in the same class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
camel-cxfunconditionally requiredhttp-whiteboard(and therefore arunning pax-web/Jetty instance), even though that's only needed for the OSGi
Servlet Whiteboard-based CXF servlet registration added in #687 (the
"Available SOAP Services" listing page). Producer-only usage and consumer
usage via another transport never needed it -
CamelCxfITestalready provescamel-cxfworks fine with a manually installed Undertow transport instead,and
camel-cxf-jettyprovides its own embedded-Jetty transport, so both werepaying for a Jetty-backed OSGi HTTP Service they don't use.
This follows the same pattern already used for
camel-cxf-jettyandcamel-cxf-spring: pull the extra dependency out of the base feature intoits own feature,
camel-cxf-whiteboard(camel-cxf+http-whiteboard),for anyone who wants the whiteboard-registered servlet.
Does this regress a bare-
camel-cxfconsumer that relied on the default transport?No. Verified directly while building the test for this PR: publishing a
cxf://consumer with no explicit transport engine (no Jetty, no Undertow)fails identically before and after this change, with
HTTPTransportFactory: Cannot find any registered HttpDestinationFactory from the Bus. The whiteboard-registered servlet fromHTTPTransportActivatorwas never sufficient on its own to publish a CXF endpoint - CXF's default
HTTPTransportFactorystill needs a realHttpDestinationFactory(theJettyDestinationFactory/UndertowDestinationFactorySPI beans thatcamel-cxf-jetty/an Undertow transport bundle provide) regardless ofhttp-whiteboard. So removinghttp-whiteboardfrom the base featuredoesn't take away any working capability; it only stops forcing a Jetty
instance that a bare
camel-cxfinstall couldn't actually make use ofeither way.
Changes
http-whiteboardfrom the basecamel-cxffeature.camel-cxf-whiteboardfeature (camel-cxf+http-whiteboard).camel-cxf-whiteboard-test) that installsthe new feature alongside a CXF endpoint served over another transport
(Undertow, same approach as
CamelCxfITest) and verifies there's noconflict.
Test plan
CamelCxfWhiteboardITest(new) passes.CamelCxfITestandCamelCxfJettyITest(existing) still passunchanged, confirming the split doesn't break either.
Fixes #755