cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-4973) Resource constructor with @PathParam always recieves the path param of the first call
Date Fri, 19 Apr 2013 12:13:16 GMT

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

Sergey Beryozkin edited comment on CXF-4973 at 4/19/13 12:12 PM:
-----------------------------------------------------------------

Yes, works with CXF 2.6.8-SNAPSHOT in standalone Tomcat too. Please create a TomEE issue.

FYI, it can probably make sense for TomEE CXF integration layer to call 
"public static JAXRSServerFactoryBean createApplication(Application app, boolean ignoreAppPath,
                                                           boolean staticSubresourceResolution)
{}"

directly after the upgrade to CXF 2.6.8, with the 2nd flag set to 'false'; the last flag can
be set to false, unless TomEE already enables a static subresource resolution. 




                
      was (Author: sergey_beryozkin):
    Yes, works with CXF 2.6.8-SNAPSHOT in standalone Tomcat too. Please create a TomEE issue.

FYI, it can probably make sense for TomEE CXF integration layer to call 
"public static JAXRSServerFactoryBean createApplication(Application app, boolean ignoreAppPath,
                                                           boolean staticSubresourceResolution)
{}"

directly after the upgrade to CXF 2.6.8, with the 2nd flag set to 'true'; the last flag can
be set to false, unless TomEE already enables a static subresource resolution. 




                  
> Resource constructor with @PathParam always recieves the path param of the first call
> -------------------------------------------------------------------------------------
>
>                 Key: CXF-4973
>                 URL: https://issues.apache.org/jira/browse/CXF-4973
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.6.7
>         Environment: tomee 1.6.0-SNAPSHOT
>            Reporter: Antoine Reilles
>            Assignee: Sergey Beryozkin
>         Attachments: testconstructor.war, web.xml
>
>
> If I define a service using a constructor for injecting path parameters, as described
in [http://cxf.apache.org/docs/jax-rs-basics.html#JAX-RSBasics-DealingwithParameters], the
service will always be intantiated by recieving the value of the path parameter that was obtained
during the first invocation of the service. Injecting the {{UriInfo}} in the service allows
to compare the constructor injected path parameter value with the one used in the service,
showing the issue.
> The attached war exhibits the issue:
> {code}GET http://localhost/testconstructor/a/b/one{code}
> returns {{OK: one}}, and prints in the logs:
> {code}
> Service Constructor called with: one
> Service nameparam one
> {code}
> A subsequent call to
> {code}http://localhost/testconstructor/a/b/two{code}
> returns an HTTP 500 (since the code raises an exception), with value {{one!= two}}, and
prints in the server logs:
> {code}
> Service Constructor called with: one
> Service nameparam two
> MyExceptionMapper: javax.ws.rs.WebApplicationException
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message