I use EMBEDDED_JBOSS_BETA3

I deploy a MBean EJB3
@Service(objectName = InstrumentManagerMBean.MDBName)
  | @Management(InstrumentManagerMBean.class)
  | public class InstrumentManagerImpl extends NotificationBroadcasterSupport
  |     implements InstrumentManagerMBean {...
  | 

When I try to add a notification listener I have an exception:

 MBeanServer mbs = (MBeanServer) 
MBeanServerFactory.findMBeanServer(null).iterator().next();
  |            ObjectName oName = new 
ObjectName(InstrumentManagerMBean.MDBName);
  |            System.out.println(mbs.isRegistered(oName));
  |            mbs.addNotificationListener(oName, new ClientListener(), null, 
null);

Exception in thread "main" javax.management.RuntimeOperationsException
  |     at 
org.jboss.mx.server.MBeanServerImpl.addNotificationListener(MBeanServerImpl.java:749)
  |     at fr.biomerieux.nextgen.commandexecutor.Main.main(Main.java:50)
  | Caused by: java.lang.IllegalArgumentException: The MBean 
nextGen:service=InstrumentManagerMBean exists but does not implement the 
NotificationBroadcaster interface.
  |     ... 2 more

Object rerieved in MBeanServerImpl is a ServiceMBeanDelegate . It is a delegate 
around my MBean. This delegate does not implement the NotificationBroadcaster . 
Consequently I cannot  register to notification listeners.

Any idea to fix that issue ? I looks like an defect. 

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

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

Reply via email to