Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class UserProvisionerProfiler implements UserProvisionerProfilerMBean {
- @Override
- public int getTotalNumberOfUsers() {
- return activeClients.size();
- }
- }
- public interface UserProvisionerProfilerMBean {
- public int getTotalNumberOfUsers();
- }
- UserProvisionerProfiler userProvisionerProfiler = new UserProvisionerProfiler();
- MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
- ObjectName name = new ObjectName(userProvisionerProfiler.getClass().getPackage().getName() + ":type=" + userProvisionerProfiler.getClass().getName());
- mbs.registerMBean(userProvisionerProfiler, name);
- 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement