1 Reply Latest reply on Dec 12, 2004 12:34 PM by Scott Stark

    MBean Dependancies

    Deepak Nohwal Newbie

      Hi,

      I have two MBeans (say A and B)in my system. Here is what I want.

      a.) MBean A should initialize something once JBoss is started.
      b.) MBean B should initialize something once A has finished initialization(of step a above).

      Now, I have extended A to ListenerServiceMBeanSupport for listening to JBoss startup to achieve (a) above.

      To achieve (b) I thought it would be best for MBean A to fire some notification once its initialization is complete and B would listen for this notification. To do this I need to extend A with NotificationBroadcasterSupport class I guess. But A already extends another class. So, how do I achieve my requirements? Or do we have a better way to achieve my requirements?

      Any help would be appreciated.

      Thanks.

        • 1. Re: MBean Dependancies
          Scott Stark Master

          ListenerServiceMBeanSupport extends org.jboss.system.ServiceMBeanSupport which extends JBossNotificationBroadcasterSupport and so service A is already a NotificationEmitter with support for maning listeners and a sendNotification method for emitting notifications.