You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2009/11/16 18:57:39 UTC

[jira] Commented: (CXF-2541) JMX Per Operation ResponseTime not collected for JAX-RS services

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

Sergey Beryozkin commented on CXF-2541:
---------------------------------------

Hi

Introducing a shared interface is an interesting idea. I think some of the JAXRS user code (custom filters, cxf interceptors, invokers) does expect OperationResourceInfo.class. Would it make sense (at least initially) to simply add another Exchange entry in addition to (rather than instead of) OperationInfo & OperationResourceInfo ? It will be just another entry in a map, with a minimum of overhead and with no impact on the existing users.

so for JAXWS we'll have :

exchange.put(OperationInfo.class, opInfo);
exchange.put(Operation.class, opInfo);

for JAXRS :

exchange.put(OperationResourceInfo.class, opInfo);
exchange.put(Operation.class, opInfo);



Another possibility is to introduce a management specific (JAXWS/JAXRS neutral) bean which will be keyed by a key like org.apache.cxf.management.operation or similar... So at the start of the exchange a management bean will be initialized and set on the exchange. The management code will check this bean/update it as needed

thoughts ?


thanks, Sergey 

> 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
>
> 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.