Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 49844 invoked from network); 16 Dec 2009 09:44:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Dec 2009 09:44:40 -0000 Received: (qmail 77916 invoked by uid 500); 16 Dec 2009 09:44:40 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 77899 invoked by uid 500); 16 Dec 2009 09:44:40 -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 77889 invoked by uid 99); 16 Dec 2009 09:44:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2009 09:44:40 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2009 09:44:38 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 28168234C498 for ; Wed, 16 Dec 2009 01:44:18 -0800 (PST) Message-ID: <1950969786.1260956658150.JavaMail.jira@brutus> Date: Wed, 16 Dec 2009 09:44:18 +0000 (UTC) From: "Cyrille Le Clerc (JIRA)" To: issues@cxf.apache.org Subject: [jira] Issue Comment Edited: (CXF-2541) JMX Per Operation ResponseTime not collected for JAX-RS services In-Reply-To: <173824980.1258392699620.JavaMail.jira@brutus> 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-2541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791290#action_12791290 ] Cyrille Le Clerc edited comment on CXF-2541 at 12/16/09 9:42 AM: ----------------------------------------------------------------- Hi Sergey, JAX-RS end point per operation monitoring works as expected with your patch. However, there is a problem for JAX-RS cleints (NPE because Service attribute is missing) ; I am working on it. {noformat} 2009/12/16 10:35:19,028 WARN [http-8080-1] org.apache.cxf.phase.PhaseInterceptorChain - Exception in handleFault on interceptor org.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptor@1e19bba3 java.lang.NullPointerException at org.apache.cxf.management.interceptor.AbstractMessageResponseTimeInterceptor.increaseCounter(AbstractMessageResponseTimeInterceptor.java:108) at org.apache.cxf.management.interceptor.AbstractMessageResponseTimeInterceptor.endHandlingMessage(AbstractMessageResponseTimeInterceptor.java:74) at org.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptor.handleFault(ResponseTimeMessageOutInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.unwind(PhaseInterceptorChain.java:384) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:305) at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:429) at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:166) at $Proxy69.sayHello(Unknown Source) ... {noformat} was (Author: cleclerc): Hi Sergey, JAX-RS end point per operation monitoring works as expected with your patch. However, there is a problem for JAX-RS cleints (NPE because Service attribute is missing) ; I am working on it. {quote} 2009/12/16 10:35:19,028 WARN [http-8080-1] org.apache.cxf.phase.PhaseInterceptorChain - Exception in handleFault on interceptor org.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptor@1e19bba3 java.lang.NullPointerException at org.apache.cxf.management.interceptor.AbstractMessageResponseTimeInterceptor.increaseCounter(AbstractMessageResponseTimeInterceptor.java:108) at org.apache.cxf.management.interceptor.AbstractMessageResponseTimeInterceptor.endHandlingMessage(AbstractMessageResponseTimeInterceptor.java:74) at org.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptor.handleFault(ResponseTimeMessageOutInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.unwind(PhaseInterceptorChain.java:384) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:305) at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:429) at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:166) at $Proxy69.sayHello(Unknown Source) ... {quote} > JMX Per Operation ResponseTime not collected for JAX-RS services > ---------------------------------------------------------------- > > Key: CXF-2541 > URL: https://issues.apache.org/jira/browse/CXF-2541 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 2.2.3 > Reporter: Cyrille Le Clerc > Attachments: cxf-2541.patch, usage-of-OperationInfo-and-OperationResourceInfo.log > > > The JMX ResponseTimeFeature does not work on a per operation basis for JAXRS calls but works on a per Service basis. > My understanding is that it works on a per service basis because both o.a.c.jaxrs.JAXRSServiceImpl and o.a.c.service.ServiceImpl implement the same o.a.c.service.Service interface and are indexed in the Exchange map at the o.a.c.service.Service entry. > On the other hand, it does not work on the per operation basis because o.a.c.jaxrs.model.OperationResourceInfo and o.a.c.service.model.OperationInfo do not implement a shared interface. Thus, the ResponseTimeFeature is specific to SOAP operations and can not handle JAXRS 'operations'. > A fix could be to introduce a shared Operation interface, to make both OperationResourceInfo and OperationInfo implement this interface and to us the interface as the key for the Exchange map instead of the current OperationResourceInfo.class and OperationInfo.class. > There are 30 "put()" & "get()" calls on OperationInfo.class. and 8 "put()" & "get()" calls on OperationResourceInfo.class. > I would be very pleased to propose a patch if the project is interested. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.