-
1. Re: Deployed service statistics
asoldano Oct 21, 2007 4:56 PM (in response to abdujaparov)The statistics you see in the deployed service list page are currently also available through a MBean for each endpoint (ManagedEndpoint). You can access them programmatically via JMX; moreover they're of course showed in the jmx-console under the jboss.ws domain.
If you think something else should be added to those statistics or simply want to know what we're working on concerning this, please read this
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=121473
and feel free to comment!
Thank you -
2. Re: Deployed service statistics
asoldano Oct 21, 2007 5:00 PM (in response to abdujaparov)Also consider we still have to fix this http://jira.jboss.org/jira/browse/JBWS-1855, but I'm quite confident it will be resolved soon.
-
3. Re: Deployed service statistics
abdujaparov Oct 22, 2007 4:13 AM (in response to abdujaparov)Hi Alessio, I've read what you have highlited but I don't understand a lot.
Does a tutorial/guide exist? If yes, where can I find it?
With that informations I remain at the beginning point.
Thanks, bye bye. -
4. Re: Deployed service statistics
asoldano Oct 22, 2007 4:28 AM (in response to abdujaparov)Hi,
unfortunately no tutorial available on this right now; however, once you understand a bit about JMX, it's quite straightforward.
I suggest you to search a bit about jmx technology on the Internet.
A brief JMX-console introduction is available here: http://wiki.jboss.org/wiki/Wiki.jsp?page=JMXConsole
For sure in future we'll enhance our documentation covering this issues too, as said in the productivity threads mentioned above. If you think something in particular should be done, feel free to comment there. -
5. Re: Deployed service statistics
oskar.carlstedt Oct 22, 2007 7:37 AM (in response to abdujaparov)Hi!
Just take a look in the source code for the jbossws web application and you´re up and running. It's really simple when you find the correct source.
Anyway, here is a code snippet ...// get SPI provider and endpoint registry SPIProvider spiProvider = SPIProviderResolver.getInstance() .getProvider(); EndpointRegistry epRegistry = spiProvider.getSPI( EndpointRegistryFactory.class).getEndpointRegistry(); // loop over all endpoints Set<ObjectName> objectNames = epRegistry.getEndpoints(); for (ObjectName objectName : objectNames) { // get the endpoint by using its name Endpoint endpoint = epRegistry.getEndpoint(objectName); ... }
Cheers,
Oskar -
6. Re: Deployed service statistics
abdujaparov Oct 22, 2007 11:33 AM (in response to abdujaparov)Hi!
I begin to study jmx, I hope to understand something, the code posted by oskar permits to take the list of web service deployed on jboss?
A question, has jbossws statistics about each operation (ex: number of request of operation echo(String) of service Pippo) of the service or only the general statistics of a service (ex: number of request of service Pippo)?
Thanks!
Bye Bye. -
7. Re: Deployed service statistics
abdujaparov Oct 23, 2007 9:43 AM (in response to abdujaparov)Hi Oskar!
What are the jar files of that classes and what are the packages?
What do I obtain with that classes?
Thanks, bye bye. -
9. Re: Deployed service statistics
abdujaparov Oct 23, 2007 10:22 AM (in response to abdujaparov)Hi Oskar, with this classes what do I obtain?
Thanks, bye bye. -
10. Re: Deployed service statistics
asoldano Oct 24, 2007 3:05 AM (in response to abdujaparov)Hi abdujaparov,
what Oskar is telling you is that instead of using JMX to access the managed endpoint MBean, you might leverage our spi to get the metrics you're looking for.
As a matter of fact, once you get the org.jboss.wsf.spi.deployment.Endpoint with the code Okar gave you, you can doEndpointMetrics epm = endpoint.getEndpointMetrics(); epm.getAverageProcessingTime(); epm.getRequestCount(); ...
This is another solution, with its own advantages and disadvantages. I still think it might be interesting to take a look at the jmx way. -
11. Re: Deployed service statistics
abdujaparov Oct 24, 2007 2:04 PM (in response to abdujaparov)Hi Alessio,
Let's see if I understand:
Could I write a web service method like this?@WebMethod public java.util.Date getStartDate(){ // get SPI provider and endpoint registry SPIProvider spiProvider = SPIProviderResolver.getInstance() .getProvider(); EndpointRegistry epRegistry = spiProvider.getSPI( EndpointRegistryFactory.class).getEndpointRegistry(); // loop over all endpoints Set<ObjectName> objectNames = epRegistry.getEndpoints(); for (ObjectName objectName : objectNames) { // get the endpoint by using its name Endpoint endpoint = epRegistry.getEndpoint(objectName); EndpointMetrics epm = endpoint.getEndpointMetrics(); return epm.getStartTime(); }
In this simple way?
Thanks, bye bye. -
12. Re: Deployed service statistics
asoldano Oct 25, 2007 3:41 AM (in response to abdujaparov)Why don't you try? Yeah, you can, this should give you the start time of one (probably the first) of your deployed endpoint.
-
13. Re: Deployed service statistics
abdujaparov Oct 25, 2007 5:07 AM (in response to abdujaparov)Hi Alesso,thanks, now it works!
Another question is it possible to get the statistics of each operation of each endpoint?
Thanks, bye bye. -
14. Re: Deployed service statistics
asoldano Oct 28, 2007 5:58 PM (in response to abdujaparov)"abdujaparov" wrote:
Hi Alesso,thanks, now it works!
Another question is it possible to get the statistics of each operation of each endpoint?
Thanks, bye bye.
No, not right now. But, as I said, we are thinking of features like this in the productivity thread I mentioned above, feel free to suggest your ideas.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=121473
Thank you