3 Replies Latest reply on May 17, 2006 6:36 AM by dimitris

    Problem with Emmiter / Listener

      Hello everybody,
      i got a failure concerning the NotificationEmitter and ListenerServiceMBeanSupport.

      My CPULoad MBean implements the NotificationEmitter Interface and i have also override the NotificationBroadcaster interface methods.

      My listener is the SnmpAgentTeam which extends the ListenerServiceMBeanSupport and overrides the handleNotification2 method.

      At the desctiptor of the SnmpAgentTeam i have the following
      <subscription-list>
      <mbean name=\"mybean.test:name=CPULoad\">
      <notification type=\".1.3.6.1.4.1.1807.500.7.2.0\"/>

      </subscription-list>

      When i deploy i'm recieving the following error:
      Failed to subscribe to: 'mybean.test:name=CPULoad', maybe not a notification broadcaster or: 'mybean.teamm:name=SnmpAgentTeam', maybe not a notification listener

        • 1. Re: Problem with Emmiter / Listener
          dimitris

          Are the mbean names correct? Do they both exist?

          • 2. Re: Problem with Emmiter / Listener

            Yes both of the names are correct. Individually can be deployed and i can see the ObjectName from the jmx console.

            It also seems that the notification type should be the value and not the name of a public attribute. That's why i'm using ".1.3.6.1.4.1.1807.500.7.2.0" instead of package.mypath.myClass.MyOID

            Should i have to defined it as managed-attribute in order to be exposed and have something like this

            <notification type="JBOSS_MONITOR_NOTIFICATION"/>
            or the code above works only for well defined JBOSS attributes?

            Cheers

            • 3. Re: Problem with Emmiter / Listener
              dimitris

              Notification type is the (string) type that is stored in the base javax.management.Notification, and it's used to setup a NotificationFilterSupport filter.