[ https://issues.apache.org/jira/browse/CXF-4154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238515#comment-13238515 ]
Daniel Kulp commented on CXF-4154: ---------------------------------- It is a valid use case. Using the UpfrontConduitSelector, an application could configure in a conduit that "protocol less" or similar that is not specific to a target. As an example, an ESB, instead of creating a conduit for each protocol, could just configure in a "SuperDoEverythingConduit" singleton or similar that is not target specific. We do want to allow that type of thing. (and there is a test that hits it which is why I added that check) :-) Anyway, thanks for verifying that the fix works. > AbstractConduitSelector reused cached conduit even if protocol was changed > -------------------------------------------------------------------------- > > Key: CXF-4154 > URL: https://issues.apache.org/jira/browse/CXF-4154 > Project: CXF > Issue Type: Bug > Components: Core > Reporter: Andrei Shakirin > Fix For: 2.6 > > Attachments: AbstractConduitSelector.patch > > > Hi, > Actually AbstractConduitSelector.getSelectedConduit() creates and caches > conduit in selectedConduit variable. Cached conduit is reused by the next > calls. > I see the following problem: if user changed protocol in URI between calls, > AbstractConduitSelector still uses cached Conduit even it cannot process new > URL. In my case cached HTTP consuit tries to process UDP URL. > Proposal for fix: check if protocol in URL was changed and if yes, close and > reset selectedConduit. > Patch is attached. > Regards, > Andrei. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira