Sasidharan, Manoj wrote:
Hello All,

I am looking for some help on writing a custom MBean for JBoss 3.2.x. Can
somebody please help.

I always did it this way:


First write the MBean interface:

import org.jboss.system.ServiceMBean;
public interface MyClassMBean extends ServiceMBean
{
   public void foo();
   ...
}

Then write the MBean:

import org.jboss.system.ServiceMBeanSupport;
public class MyClass extends ServiceMBeanSupport implements MyClassMBean {
   public void foo()
   {
      ...
   }
}

Write the jndi name to a jboss-service.xml file:

<mbean code="package.MyClass"
   name="MyClass:name=MyClass">
</mbean>

Package it as a .sar and deploy. Easy.

-marek



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to