//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////----------------- end of implementation ---------------

However, whan I implement it as a ModelMBean (not directly ModelMBean, because I need to use PersistPolicy; I tried to implement it as ModelBase or as XMBean - both times) it does not wortk - it bring out an exception (which is not brough out when I use DynamicMBean implementation of the same Mbean):

MBeanException: preRegister() failed [ObjectName='DefaultDomain:type=com.peerdirect.rmapplications.master.jmx.PulsarStandard',Class=com.peerdirect.rmapplications.master.jmx.PulsarStandard (com.peerdirect.rmapplications.master.jmx.PulsarStandard@5bdc50)] Cause: java.lang.NullPointerException at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:187) at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:975) at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:302) at com.peerdirect.rmapplications.agent.BaseAgent.(BaseAgent.java:67) at com.peerdirect.rmapplications.agent.MasterAgent.(MasterAgent.java:5) at com.peerdirect.rmapplications.agent.MasterAgent.main(MasterAgent.java:15)

Here is my implementation as ModelBase (absolutely the same thing happens when I use XMBean instead of ModelBase):--------------------- start of implementation --------package com.peerdirect.rmapplications.master.jmx;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--------------------- end of implementation --------

I still have the following problem:MBeanException: preRegister() failed [ObjectName='DefaultDomain:type=com.peerdirect.rmapplications.master.jmx.PulsarStandard', Class=com.peerdirect.rmapplications.master.jmx.PulsarStandard (com.peerdirect.rmapplications.master.jmx.PulsarStandard@3020ad)]Cause: ReflectionException: nullCause: javax.management.IntrospectionException: no method found for operation: startPulse at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:187) at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:975) at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:302) at com.peerdirect.rmapplications.agent.BaseAgent.(BaseAgent.java:67) at com.peerdirect.rmapplications.agent.MasterAgent.(MasterAgent.java:5) at com.peerdirect.rmapplications.agent.MasterAgent.main(MasterAgent.java:15)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--------------- end ----------------------------

If I use the following (the constructors do not use the descriptor): /*Descriptor descr_my = new DescriptorSupport(); descr_my.setField(PERSIST_POLICY, "OnUpdate"); descr_my.setField(PERSIST_LOCATION, "c:\\aa"); descr_my.setField(PERSIST_NAME, "storage.txt"); System.out.println ("Valid " + descr_my.isValid()); System.out.println ("Name: " + void.class.getName());*/