You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2011/03/09 10:08:59 UTC

[jira] Created: (CXF-3384) Create one http transport that is always present and delegates to the actual http transport

Create one http transport that is always present and delegates to the actual http transport
-------------------------------------------------------------------------------------------

                 Key: CXF-3384
                 URL: https://issues.apache.org/jira/browse/CXF-3384
             Project: CXF
          Issue Type: Improvement
            Reporter: Christian Schneider


Problem:
Currently we have three server side http transports: Servlet, Jetty and Osgi. They each register for the same transport URIs. So only one of them may be present at a time. So it is necessary for usersto import a special spring context like cxf-servlet.xml for each transport. 

Additionally it is difficult to for example test with jetty and run with servlet in production using the same code. It is also not possible to publish some services using a servlet and others using a sperate port using jetty.

Solution:
So to make things easier and more flexible we should register a delegating http transport that analyzes the endpoint url and delegates to the correct transport factory. So if the url contains a server name then jetty should be used. If not then the servlet transport should be used. Optionally an OSGi environment should also be detected and then the OSGi servlet transport should be used instead of the normal servlet transport
 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3384) Create one http transport that is always present and delegates to the actual http transport

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004472#comment-13004472 ] 

Sergey Beryozkin commented on CXF-3384:
---------------------------------------

> Optionally an OSGi environment should also be detected and then the OSGi servlet transport should be used instead of the normal servlet transport


Having an OSGI Activator withing the HTTP servlet transport would be one way in which case the CXF OSGI HTTP transport can be made redundant.

> Create one http transport that is always present and delegates to the actual http transport
> -------------------------------------------------------------------------------------------
>
>                 Key: CXF-3384
>                 URL: https://issues.apache.org/jira/browse/CXF-3384
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Christian Schneider
>
> Problem:
> Currently we have three server side http transports: Servlet, Jetty and Osgi. They each register for the same transport URIs. So only one of them may be present at a time. So it is necessary for usersto import a special spring context like cxf-servlet.xml for each transport. 
> Additionally it is difficult to for example test with jetty and run with servlet in production using the same code. It is also not possible to publish some services using a servlet and others using a sperate port using jetty.
> Solution:
> So to make things easier and more flexible we should register a delegating http transport that analyzes the endpoint url and delegates to the correct transport factory. So if the url contains a server name then jetty should be used. If not then the servlet transport should be used. Optionally an OSGi environment should also be detected and then the OSGi servlet transport should be used instead of the normal servlet transport
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3384) Create one http transport that is always present and delegates to the actual http transport

Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022123#comment-13022123 ] 

Glen Mazza commented on CXF-3384:
---------------------------------

How do you determine if the "url contains a server name" in order to use Jetty?  What is the algorithm for determining whether an OSGi environment is in use?  Might it be better to add an additional element explicitly specifying whether jetty, standalone servlet container, or OSGi is intended for the particular configuration?

> Create one http transport that is always present and delegates to the actual http transport
> -------------------------------------------------------------------------------------------
>
>                 Key: CXF-3384
>                 URL: https://issues.apache.org/jira/browse/CXF-3384
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.4
>
>
> Problem:
> Currently we have three server side http transports: Servlet, Jetty and Osgi. They each register for the same transport URIs. So only one of them may be present at a time. So it is necessary for usersto import a special spring context like cxf-servlet.xml for each transport. 
> Additionally it is difficult to for example test with jetty and run with servlet in production using the same code. It is also not possible to publish some services using a servlet and others using a sperate port using jetty.
> Solution:
> So to make things easier and more flexible we should register a delegating http transport that analyzes the endpoint url and delegates to the correct transport factory. So if the url contains a server name then jetty should be used. If not then the servlet transport should be used. Optionally an OSGi environment should also be detected and then the OSGi servlet transport should be used instead of the normal servlet transport
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3384) Create one http transport that is always present and delegates to the actual http transport

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022132#comment-13022132 ] 

Christian Schneider commented on CXF-3384:
------------------------------------------

Currently the code just looks at the trailing http ... which is perhaps not perfect as it would use jetty if you write: address=httpEndpoint.

The OSGi case is not considered at all. If you write your address like "/MyEndpoint" then the servlet transport is used. The servlet transport works exactly the same in and outside OSGi. For OSGi you just have to add the import cxf-extension-osgi.xml to your spring context. So it wires the endpoints to the servlet that cxf is starting.

So I think we simply need a more refined strategy to choose between jetty and servlet. The good thing with only determining the transport impl by the address is that the address can easily be changed using a property. So for example you can easily use jetty in tests while you use servlet in production


> Create one http transport that is always present and delegates to the actual http transport
> -------------------------------------------------------------------------------------------
>
>                 Key: CXF-3384
>                 URL: https://issues.apache.org/jira/browse/CXF-3384
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.4
>
>
> Problem:
> Currently we have three server side http transports: Servlet, Jetty and Osgi. They each register for the same transport URIs. So only one of them may be present at a time. So it is necessary for usersto import a special spring context like cxf-servlet.xml for each transport. 
> Additionally it is difficult to for example test with jetty and run with servlet in production using the same code. It is also not possible to publish some services using a servlet and others using a sperate port using jetty.
> Solution:
> So to make things easier and more flexible we should register a delegating http transport that analyzes the endpoint url and delegates to the correct transport factory. So if the url contains a server name then jetty should be used. If not then the servlet transport should be used. Optionally an OSGi environment should also be detected and then the OSGi servlet transport should be used instead of the normal servlet transport
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-3384) Create one http transport that is always present and delegates to the actual http transport

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Schneider resolved CXF-3384.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4
         Assignee: Christian Schneider

> Create one http transport that is always present and delegates to the actual http transport
> -------------------------------------------------------------------------------------------
>
>                 Key: CXF-3384
>                 URL: https://issues.apache.org/jira/browse/CXF-3384
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 2.4
>
>
> Problem:
> Currently we have three server side http transports: Servlet, Jetty and Osgi. They each register for the same transport URIs. So only one of them may be present at a time. So it is necessary for usersto import a special spring context like cxf-servlet.xml for each transport. 
> Additionally it is difficult to for example test with jetty and run with servlet in production using the same code. It is also not possible to publish some services using a servlet and others using a sperate port using jetty.
> Solution:
> So to make things easier and more flexible we should register a delegating http transport that analyzes the endpoint url and delegates to the correct transport factory. So if the url contains a server name then jetty should be used. If not then the servlet transport should be used. Optionally an OSGi environment should also be detected and then the OSGi servlet transport should be used instead of the normal servlet transport
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira