users@glassfish.java.net

Self Managment

From: <glassfish_at_javadesktop.org>
Date: Fri, 11 Apr 2008 04:57:23 PDT

Hi Sankara

Need your help ,I am have registered my custom mbean with mbean server using code
  ManagementFactory.getPlatformMBeanServer().registerMBean(new CustomMBean(), new ObjectName(name)) , when I start my application

I have not added this custom mbean to MBean class loader and instead made it part of ear.Now I try to register this MBean

using asadmin create MBean method but it complains that findClass is unable to find the class .(Since its not part of MBean class loader or common class
loader) .

I neglect it and try to create a self managment rule using

asadmin createmanagement-rule but it gets created (of course when i try to see it in Admin Console it complains that it is unable to find the class)

What I need is to create a managment rule with a custom action (CustomMBean) but I dont want CustomMBean to be deployed as seprate jar
but i want to part of EAR ,I have registered MBean with glaassfish ,I can see it in jconsole but I still dont know why SelfManagemnt
need to look for class MBean when its already registerd with MBean Server.

I have also used a name like this "user:impl-class-name=com.ericsson.iptv.iap.faultmanagement.ApplicationFM,name=ApplicationFM,server=server"

so that self management can find the MBean
[Message sent by forum member 'akhilesh1981' (akhilesh1981)]

http://forums.java.net/jive/thread.jspa?messageID=268739