Even after implementing the interface I am getting the same error. Below is the 
mbean class 


package com.clique.cmg.util;

import org.jboss.annotation.ejb.Service;
import org.jboss.annotation.ejb.Management;
import javax.management.Notification;
import javax.management.*;
import org.jboss.mx.util.*;
import java.util.*;

@Service (objectName="TestJmxBean:service=Jmxcalculate")
@Management(JmxCalculatorMBean.class)
public class JmxCalculator extends JBossNotificationBroadcasterSupport
         implements JmxCalculatorMBean, NotificationBroadcaster {

  int growthrate;
  int result;

  public void setGrowthrate (int growthrate) {
    this.growthrate = growthrate;
  }

  public int getGrowthrate () {
    return growthrate;
  }
  
  public int calculate (int start, int end) {
    result = growthrate + start + end;
    emitNotification();
    return result;
  }

  // Lifecycle methods
  public void create() throws Exception {
       
        growthrate = 50;
        System.out.println("Calculator - Creating");
    
  }

  public void destroy() {
    System.out.println("Calculator - Destroying");
  }

  private void emitNotification() {
     try {
     System.out.println("Send the Notification");
     Notification attribNotify = new Notification("cmg", this, 1L, "Notify the 
result: " + result);
     sendNotification(attribNotify);         
      }  catch (Exception e)  {
            e.printStackTrace();
            System.out.println("Error in broadcaster");
        }
  }
  
}

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058796#4058796

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058796
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to