cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-3160) Reduce Code duplication between http transport variants
Date Thu, 02 Dec 2010 22:34:14 GMT

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

Christian Schneider commented on CXF-3160:
------------------------------------------

Hi Sergey,

I am quite sure it is possible to at least almost remove the osgi code. I was preparing a
larger refactoring first but got stuck at some point. In the other refactoring only the SpringOsgiServlet
was left as it sets the context classloader which is not useful outside osgi. You said your
examples were failing. Did you test with my patch or with yours? If you see some problems
it would be great if you could supply me some sample code that shows them. Perhaps you could
also attach your patch so I can check what ideas you pursue.

What I found in any case is that ServletTransportFactory checks for the last base path that
the controller processed. The OSGI http transport does not do this. Do you know why there
is this difference?

Btw. in the larger refactoring I tried to reuse the DestinationRegistry from the OSGI code
for the other variants. I really like that it is separated from the TransportFactory. I also
tried to extract the service listing into a separate class and reuse this for all variants.
I would be really interested what you think about doing these two things. Still I would not
like to do all these thing in once as they got me stuck.

On the mailing list Dan wrote that he considered also using a servlet for the http jetty transport.
I am quite sure that we could use mostly the same code for servlet, jetty and osgi.

Christian


> Reduce Code duplication between http transport variants
> -------------------------------------------------------
>
>                 Key: CXF-3160
>                 URL: https://issues.apache.org/jira/browse/CXF-3160
>             Project: CXF
>          Issue Type: Improvement
>          Components: Transports
>    Affects Versions: 2.3.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>         Attachments: CXF-3160-1.patch
>
>
> We still have to much duplicated or very similar code in the http transports. 
> Moving header code from AbstractHttpDestination to Headers
> Moving invokeDestination from ServletController to AbstractServletController to share
this code with http-osgi
> Moving invoke from ServletDestination to AbstractHttpDestination  to share this code
with http-osgi
> Removing doMessage from OsgiDestination
> Removing invokeDestination from OsgiServletcontroller
> Ignoring some mock based tests that do not work anymore. Will have to do some work on
them
> There are some small changes in the behaviour for http-osgi as we are now using the servlet
code here. It would be great if Sergey or Dan could review this. IdonĀ“t think the differences
are important but I am not sure.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message