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

scott.stark@jboss.org do-not-reply at jboss.com
Wed May 27 15:50:18 EDT 2009


Just set the ctor on the bean meta data to use the JBossASKernel.AlreadyInstantiated ctor metadata. I think we are doing this elsewhere for the situation you describe.


  |    public static class AlreadyInstantiated extends AbstractConstructorMetaData
  |    {
  |       private static final long serialVersionUID = 1L;
  |       
  |       private Object bean;
  | 
  |       public class Factory
  |       {
  | 
  |          public Object create()
  |          {
  |             return bean;
  |          }
  |       }
  | 
  |       public AlreadyInstantiated(Object bean)
  |       {
  |          this.bean = bean;
  |          this.setFactory(new AbstractValueMetaData(new Factory()));
  |          this.setFactoryClass(Factory.class.getName());
  |          this.setFactoryMethod("create");
  |       }
  |    }
  | 


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

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



More information about the jboss-dev-forums mailing list