Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD12210B70 for ; Fri, 19 Apr 2013 14:59:18 +0000 (UTC) Received: (qmail 8131 invoked by uid 500); 19 Apr 2013 14:59:18 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 7923 invoked by uid 500); 19 Apr 2013 14:59:17 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 7588 invoked by uid 99); 19 Apr 2013 14:59:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Apr 2013 14:59:16 +0000 Date: Fri, 19 Apr 2013 14:59:16 +0000 (UTC) From: "Antoine Reilles (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-4973) Resource constructor with @PathParam always recieves the path param of the first call MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-4973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13636451#comment-13636451 ] Antoine Reilles commented on CXF-4973: -------------------------------------- Yes, I confirm: running the sample in a plain tomcat, I connot reproduce the issue. It is probably tomee specific: I will open the issue on their side, and reference this one. Thanks a lot for the analysis ! > 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