Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • In the whiteboard pattern, one can register an MBean through registering its interface to the framework as a service. If the interface name ends with MBean or if the interface is javax.management.DynamicMBean, the agent will automatically register the implementation as a standard MBean. The objectName of the MBean can either be defined at registration time with the org.apache.felix.mosgi.jmx.agent.Constants.OBJECTNAME property name or automatically build through introspection.

For instance :

Code Block
 java.util.Properties prop=new java.util.Properties();
 prop.add( org.apache.felix.mosgi.jmx.agent.Constants.OBJECTNAME, "Foo:FooName");
 context.registerService(test.FooMBean.class.getName(), new test.Foo());