[jboss-dev-forums] [Design of Management Features on JBoss] - Re: How to Expose MBean Invocation Stats into admin-console?

ALRubinger do-not-reply at jboss.com
Wed May 27 13:34:24 EDT 2009


At the point now where I'm adding a ManagedObject:

@ManagementObject(name = "jboss.system:type=ALRTest", 
  |       isRuntime = true, 
  |       properties = ManagementProperties.EXPLICIT, 
  |       description = "Some test", 
  |       componentType = @ManagementComponent(type = "MCBean", subtype = "*"))
  | public class BasicSessionMetrics implements SessionMetrics{...}

This gets installed like:

@Override
  |    public void deploy(final DeploymentUnit du, final Ejb3Deployment deployment) throws DeploymentException
  |    {
  |       // Determine if we process this deployment
  |       if (deployment == null)
  |       {
  |          // Not an EJB3 Deployment
  |          if (log.isTraceEnabled())
  |          {
  |             log.trace("Skipping non-EJB3 Deployment: " + du);
  |          }
  |          return;
  |       }
  | 
  |       // Log
  |       if (log.isTraceEnabled())
  |       {
  |          log.trace("Deploying EJB3 Session metrics for : " + du);
  |       }
  | 
  |       // Make a new metrics definition
  |       final String metricsBeanName = deployment.getName() + BEAN_NAME_METRICS_SUFFIX;
  |       final SessionMetrics metrics = new BasicSessionMetrics();
  | 
  |       // Add the attachment
  |       du.addAttachment(metricsBeanName, metrics);
  | 
  |       // Set metrics upon the deployment
  |       deployment.setMetrics(metrics);
  |       log.debug("Set EJB3 metrics upon " + du);
  | 
  |       // Set a flag showing we were here as the output
  |       du.addAttachment(NAME_OUTPUT, true, Boolean.class);
  |    }

...though does not appear in the ManagedObjects debug servlet.  Should I be expecting it there?

S,
ALR



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233707#4233707

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233707



More information about the jboss-dev-forums mailing list