title: Why might this inner class be a noncompliant MBean?
body: <p>It seems that the fact that my class is an inner class is causing the issue, that's my hunch - but basically it's otherwise the usual pattern:</p>
  
  <pre><code>public class UserProvisionerProfiler implements UserProvisionerProfilerMBean {
  
      @Override
      public int getTotalNumberOfUsers() {
          return activeClients.size();
      }
  }
  </code></pre>
  
  <p>And the interface (nested in a larger class):</p>
  
  <pre><code>public interface UserProvisionerProfilerMBean {
  
  public int getTotalNumberOfUsers();
  
  }
  </code></pre>
  
  <p>Registered in the code:</p>
  
  <pre><code>    UserProvisionerProfiler userProvisionerProfiler = new UserProvisionerProfiler();
  
      MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
      ObjectName name = new ObjectName(userProvisionerProfiler.getClass().getPackage().getName() + ":type=" + userProvisionerProfiler.getClass().getName());
  
      mbs.registerMBean(userProvisionerProfiler, name);
  </code></pre>
  
  <p>And the error:</p>
  
  <pre><code>   1356 [1;31mERROR[39m [main],            UserProvisioner  ; Unhandled exception caught in     main()
  javax.management.NotCompliantMBeanException: MBean class UserProvisioner$UserProvisionerProfiler does not implement DynamicMBean, and neither follows the Standard MBean conventions (javax.management.NotCompliantMBeanException: Class UserProvisioner$UserProvisionerProfiler is not a JMX compliant Standard MBean) nor the MXBean conventions (javax.management.NotCompliantMBeanException: UserProvisioner$UserProvisionerProfiler: Class UserProvisioner$UserProvisionerProfiler is not a JMX compliant MXBean)
  at com.sun.jmx.mbeanserver.Introspector.checkCompliance(Introspector.java:171)
  at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:317)
  at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:512)
  UserProvisioner.registerThisAsMBean(UserProvisioner.java:734)
  UserProvisioner.start(UserProvisioner.java:797)
  UserProvisioner.main(UserProvisioner.java:844)
  </code></pre>
  
  <p>I've had little success in finding a stricter definition of a compliant MBean short of reading the JMX spec or code, so I'm wondering if I can salvage the inner class or if I have to separate it out, or if there is something else I'm missing.</p>