• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB3 Bean Monitoring

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, all. I would like to monitor ejb3 bean statistics from my ear app using JBoss AS 5.1. It doesn't look like embedded jopr supports that functionality yet. I never used 4.2, so I don't know this for sure, but it looks like this functionality used to exist in the web console, so I have been trying to use web console to get the data. However, when I try to drill down in the web console j2ee domain (left side of screen), the ejb module is a leaf. The xml on the right side of the screen says: "Provides Statistics: false." Is there any way to make an EJB module in 5.1 provide statitistics to web console? Do I need to add an interceptor somewhere?

Thanks for any insight on this matter.

Josh
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My understanding was that the admin console does provide the statistics. Although, you might want to use the EJB3 plugin against your 5.1 AS, since the metrics reporting in EJB3 was improved after 5.1 was released.
 
Josh Britton
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply. It's good to know that the admin console is supposed to supply bean-specific invocation data -- now if only I could get it to work! I installed the latest ejb3 jar, but I still don't see any statistics for individual beans. When I "drill down" in the admin console, the ear and the ejb module are both leaf-nodes: they do not provide views of data on individual beans.

I suspect that I am missing some simple configuration: that is usually where I err. Is there some way to "turn on" statistics collecting/reporting for beans? My app is running fine, the beans are working well and I can see them with jmx-console.

Any further ideas would be welcome!

Josh
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Josh Britton wrote:but I still don't see any statistics for individual beans. When I "drill down" in the admin console, the ear and the ejb module are both leaf-nodes: they do not provide views of data on individual beans.



I see what you mean. Indeed the individual beans aren't listed there. I haven't used the admin console much, so did not know, that at the moment, it only lists "applications" and not the individual beans.

Instead of the admin-console, use the jmx-console for EJB3 metrics. On the jmx-console page, under the jboss.j2ee domain, you will notice a link to a MBean corresponding to your bean (for example, jar=jboss-ejb3-tutorial-stateless.jar,name=CalculatorBean,service=EJB3). Click on that link and you will be redirected to the metrics page of that bean.
 
Josh Britton
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for sticking with me, here.

When I use the jmx-console, I do not see any MBeans corresponding to my beans in jboss.j2ee. The only listings are:


ear=profileservice-secured.jar,jar=profileservice-secured.jar,service=EJB3
jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3
jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3
jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3
service=EARClassLoaderDeployer
service=EARDeployer


In fact, jmx doesn't show any MBean in any domain for specific beans in my app (or for the JBoss apps, such as web-console, for that matter (excepting profileservice, as shown above)). I know my beans are deployed, because they work (my clients access them and use them frequently and successfully). So I suspect that there is some small module or jmx configuration issue that I am missing. Do I need to add an interceptor somewhere? Or is there a setting needed in an app-related configuration file, such as application.xml or ejb-jar.xml?

Thanks for any further insights. I'm still fairly new to JBoss, and it is hard to troubleshoot without a good sense of the underlying system. I'm working my way through your book to get that sense!

Josh
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Josh Britton wrote:

In fact, jmx doesn't show any MBean in any domain for specific beans in my app (or for the JBoss apps, such as web-console, for that matter (excepting profileservice, as shown above)). I know my beans are deployed, because they work (my clients access them and use them frequently and successfully).



There's no additional configuration required to enable those MBeans. Can you post your console logs which show that the beans are being deployed? Those will also show the MBean names being used for your beans.
 
Josh Britton
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was wrong (wish I could say that was surprising). The test deployment on my local machine was failing to deploy my EAR. When I fixed the deployment error, the individual beans showed in jmx and I could see the MBean attribute display for invocation statistics. Excellent. I wish those stats were available through web-console: I would like to graph them and register monitors on them. Nonetheless, at least now I can access them. Thanks for your guidance, and sorry for newbie bumbling. I will look forward to a more thoroughly featured admin console!

Josh
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I would like to graph them and register monitors on them


Look at Jopr, nagios or groundwork open source. I think all of them will do this.
 
reply
    Bookmark Topic Watch Topic
  • New Topic