you can use JMX for mbean invocation.
Get the MBeanServer like this:
MBeanServer mbeanServer =
(MBeanServer) MBeanServerFactory.findMBe
anServer(n
ull).itera
tor().next
();
Create an ObjectName for your MBean like this:
ObjectName objectName = new ObjectName("
:e>");
e.g. ObjectName objectName = new ObjectName("com.example:service=myservice");
Check the JMX Console for the name of your MBean.
Then, invoke methods against your mbean as follows:
mbeanServer.invoke(objectName, "", new Object[]{}, new String[]{} );