cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sbery...@progress.com>
Subject Re: JMX - JAX-RS multiple service beans - only one is managed
Date Wed, 27 Jan 2010 17:47:09 GMT
Hi Paul

As I've briefly mentioned in the other email, you can have a jaxrs:server/@serviceName attribute
(in 2.2.6).
This may help even if you have a single service bean. Cyrille and myself worked on ensuring
JAXRS Operation stats are displayed 
properly on client and server sides, including for WebClients. For WebClients (the client
side only) the syntesized opName is 
{requestUri}httpVerb.

If you have a single endpoint with multiple beans on the server side then the operationName
attribute will read as fully-qualified 
resourceClassName#operName...
I'm a bit late on updating te docs, will update them soon.

This is a basic start, hope we can come up with something intersting in the area of management
later on...

cheers, Sergey

----- Original Message ----- 
From: "Paul Wilton" <Paul.Wilton@bbc.com>
To: "Sergey Beryozkin" <sberyozk@progress.com>; <users@cxf.apache.org>
Sent: Monday, November 30, 2009 4:43 PM
Subject: RE: JMX - JAX-RS multiple service beans - only one is managed


I guess having per-Operation stats is much more useful and important
than the separation of the root resources form the server end point.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com]
Sent: 30 November 2009 16:06
To: Paul Wilton; users@cxf.apache.org
Subject: Re: JMX - JAX-RS multiple service beans - only one is managed

Hi Paul

I'm not entirely sure yet that introducing a shared Operation interface
is how
CXF-2541 will be fixed, but unless other ideas emerge then we will
proceed with the shared interface ...Either way CXF-2541 will
need to be fixed for the next release (CXF 2.2.6) which will let users
see statistcis for individual operations...

I'm still not sure though how to approach the issue with multiple root
resources. At the moment there's one to one correspondence
between a CXF Service instance and a jaxrs:server endpoint.
irrespectively of how many root resources the latter contains. The QName

of this service is a syntesized QName of the first root resource. This
is misleading so I will probably add a serviceQName attribute
to jaxrs:server to avoid the confusion...Still not sure though how to
ensure users can see per-resource statictics with individual
resources attached to a single jaxrs:server endpoint - will need to
investigate and may be introduce a JAXRS specific JMX
interceptor which will add few extra beans to the tree...

cheers, Sergey


Hi Sergey
Do you think any of the CXF-2541 enhancements will make it into the next
version?
Just trying to ascertain timescales - with view to either waiting for
these enhancements, or coding enhanced JAX-RS, JMX monitoring into my
app myself.

Thanks
Paul


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com]
Sent: 27 November 2009 16:52
To: users@cxf.apache.org
Subject: Re: JMS - JAX-RS multiple service beans - only one is managed

Hi Paul


Please see comments inline with S.B.


Hi
I have setup JMX monitoring for my CXF JAX-RS endpoint.
I have a couple of questions.

1. I have two service beans configured for one rest server:
    <jaxrs:server id="mpcRestServer" address="/">
        <jaxrs:serviceBeans>
            <ref bean="myRestServer1"/>
            <ref bean="myRestServer2"/>
        </jaxrs:serviceBeans>
        <jaxrs:providers>
            <ref bean="jsonProvider"/>
            <ref bean="atomFeedProvider"/>
            <ref bean="atomEntryProvider"/>
            <ref bean="stringListProvider"/>
        </jaxrs:providers>
    </jaxrs:server>
However, when I connect to the mbean server with jconsole, only the
first service bean listed is being monitored.
Is there something else I need to configure to make this happen or is it
a bug?

> S.B. It may be qualified as a bug, but the thing is a jaxrs:server is
seen as a single Service at the moment, irrespective of how
> many resource classes are involed...I'm not sure yet whether it will
be feasible to register two CXF services in this case, one
> per each root resource bean.

2. Only counters on the servicebean are being monitored. There seems to
be no monitoring on jax-rs operations.
Do I need to annotate the operations individually  - if so do you have
any examples?

> S.B
Please see http://issues.apache.org/jira/browse/CXF-2541, we're
discussing with Cyrille how to fix it...
I'm also going to look into the monitoring for multiple root beans issue

thanks, Sergey

Thanks
Paul
This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless
specifically stated. If you have received it in error, please delete it
from your system. Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.

Please note that the BBC monitors e-mails sent or received. Further
communication will signify your consent to this

This e-mail has been sent by one of the following wholly-owned
subsidiaries of the BBC:

BBC Worldwide Limited, Registration Number: 1420028 England, Registered
Address: BBC Media Centre, 201 Wood Lane, London, W12 7TQ
BBC World News Limited, Registration Number: 04514407 England,
Registered Address: BBC Media Centre, 201 Wood Lane, London, W12 7TQ
BBC World Distribution Limited, Registration Number: 04514408,
Registered Address: BBC Media Centre, 201 Wood Lane, London, W12 7TQ


Mime
View raw message