You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2014/04/23 17:53:14 UTC

[jira] [Commented] (CXF-5410) Auto-registration of HTTP destinations in Blueprint should be optional

    [ https://issues.apache.org/jira/browse/CXF-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13978345#comment-13978345 ] 

Sergey Beryozkin commented on CXF-5410:
---------------------------------------

The problem can be generalized as follows: default HTTP OSGI transport interferes if the bundle contains a web.xml with CXFServlets. The typical goal of using web.xml is to introduce multiple or alternative paths into the web application. In addition, the servlet approach  provides for the richer ServletContext supporting redirects, etc.
When using web.xml, the default servlet introduces (at least) 2 side-effects:
-  /cxf prefixed path into the deployed endpoint is added unexpectedly (as documented in this JIRA)
- deploying multiple servlets (in a single war or even in different wars) with the same base endpoint address fails while works fine in non-OSGI cases. 

Right now I can only think of two options:
1. Introduce an OSGi property that will instruct the default servlet listening on "/" (or the global registry) to ignore new registrations
2. Reintroduce HTTP OSGI transports so that the developers could exclude the dependency when using web.xml

1. is probably simpler...if 2 was considered then we'd rather do it before 3.0.0 is out


>  Auto-registration of HTTP destinations in Blueprint should be optional  
> -------------------------------------------------------------------------
>
>                 Key: CXF-5410
>                 URL: https://issues.apache.org/jira/browse/CXF-5410
>             Project: CXF
>          Issue Type: Bug
>          Components: OSGi, Transports
>            Reporter: Sergey Beryozkin
>             Fix For: 3.0.0
>
>
> CXF HTTP Transport offers an auto-registration support of HTTP destinations with a default CXF Servlet in OSGI Blueprint. This is generally useful when the users register JAXWS or JAXRS endpoints from Blueprint CXF extensions.
> However it also catches the endpoint registrations done via the alternative mechanisms. For example, CXFBlueprintServlet can be used to register CXF Blueprint endpoints. Suppose  CXFBlueprintServlet offers a "/a" servlet path, as the result the CXF endpoint will be accessible via "/a" and in addition, the default CXFServlet "/cxf" or other configured path. 
> This opens the extra path into the endpoint which will be unexpected for CXFBlueprintServlet users 
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)