#7 MBeanServerInterceptor configurable

closed-fixed
nobody
5
2002-09-19
2002-09-06
No

Make MBeanServerInterceptor configurable at runtime
via the configurator MBean.

Discussion

  • Simone Bordet

    Simone Bordet - 2002-09-19
    • status: open --> closed-fixed
     
  • Simone Bordet

    Simone Bordet - 2002-09-19

    Logged In: YES
    user_id=128193

    Implemented.

    Now it is possible to add at runtime an interceptor like this:

    MBeanServer server = MBeanServerFactory.newMBeanServer
    ();
    ObjectName configurator = new ObjectName
    (MBeanServerInterceptorConfigurator.OBJECT_NAME);
    MyMBeanServerInterceptor my = new
    MyMBeanServerInterceptor();
    // This call will use the old interceptor chain
    server.invoke(configurator, "addInterceptor", new Object[]{my},
    new String[]{MBeanServerInterceptor.class.getName()});
    // This call will use the new interceptor chain
    server.getAttribute(configurator, "Running");

     

Log in to post a comment.