2 Replies Latest reply on Nov 12, 2002 9:42 PM by adrian.brock

    Adding MBean at runtime

    magnayn

      I'm confused - I have some code that deploys an MBean by way of the jboss-service.xml, which seems to work.

      However, I have a class in which I want to dynamically add a model MBean - It does the following:

      MBeanServer server = MBeanServerFactory.createMBeanServer();
      ObjectName name = new ObjectName("user:service=systemconfiguration");
      ObjectInstance oi = server.registerMBean( INSTANCE, name );

      The code seems to run without exception, but the MBean never appears in the http view (localhost:8082).

      Why is this?