You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Thorsten Meinl (JIRA)" <ji...@apache.org> on 2015/02/10 21:39:11 UTC

[jira] [Updated] (TOMEE-1510) CXF Continuations not working for REST services

     [ https://issues.apache.org/jira/browse/TOMEE-1510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Meinl updated TOMEE-1510:
----------------------------------
    Attachment: org.example.continuations_tomee.zip
                org.example.continuations_tomcat.zip

Attached are two minimal Eclipse webapp projects. One is for TomEE 1.7.1 the other for plain Tomcat 7.0.55. The only differences are
- scope provided vs. compile in pom.xml for CXF stuff
- a web.xml with registering CXFNonSpringServlet for Tomcat

The remaining code in class Test is identical. The service with continuations works as expected in plain Tomcat but fails both in TomEE 1.7.1 and yesterday's 1.7.2-SNAPSHOT. I haven't looked into the 1.7.2 code yet, but I guess the solution would be similar to the one for 1.7.1 I described before.

> CXF Continuations not working for REST services
> -----------------------------------------------
>
>                 Key: TOMEE-1510
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1510
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Thorsten Meinl
>         Attachments: org.example.continuations_tomcat.zip, org.example.continuations_tomee.zip
>
>
> CXF Continuations for asynchronous REST requests are not working. You can suspend the current request but when you try to resume it, the original method will not be found. I debugged into the code and the bug seems to be in line 118 of org.apache.tomee.webservices.TomcatRsRegistry. The URL mapping as added both to the mapping wrapper (line 117) and the context itself. In line 117 the context root is correctly removed but in line 118 it isn't. Therefore the context has a mapping of e.g. "/my.context/rest/*" instead of the correct "/rest/*".
> The problem does not become apparent on the intial request because there the URL mapping of the Connector is used to dispatch to the correct class and method and not the Context's mapping. The connector has the correct mapping (in addition to the wrong one), which was added by org.apache.catalina.connector.MapperListener.registerContext. However, when using continuations, only the context's mapping is consulted because it's an "internal" request. Due to the wrong mapping the "/" mapping is used in the end.
> The fixed would be simple, just remove the context in line 118, too. I cannot judge if this has any side-effects, though.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)