1

I have an abstract class which implements an mbean interface. I have declared 2 getters in the interface. When i run the code, using jconsole i can access the 2 getters but i am not able to access the 2 attributes which are declared in the abstract class.What can i do to access the attributes?

I have done the registry as -

MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName id = new ObjectName("pkgname:type=AbcMBean");
StandardMBean mbean = new StandardMBean(xyz, AbcMBean.class);
server.registerMBean(mbean, id);

xyz is the object of the abstract class Abc

I have set the values of the attributes in one of the functions of the abstract class. i haven't used any setters.

0 Answers0