Is it possible to send a JMX notification from a POJO annotated with Service/Management only?
I've tried various different ways, but nothing seems to work. I can get to a stage where via jvisualvm I can subscribe to the MBean, but the notifications are not being 'caught'.
It seems the client is not being added to the Broadcaster??
I'm not recieving any errors..
@Service(objectName = "com.example:type=test,name=jbossjmxtester")
public class Tester extends ServiceMBeanSupport implements TesterI {
public void somethingHappened() {
System.out.println("send notification");
Notification notification =
new Notification("com.example", this, nextNotificationSequenceNumber());//, "test notification");
sendNotification(notification);
}
}
@Management
interface TesterI {
public void somethingHappened();
}
I've been trawling through the forums, but can't find anything on this. Has anybody else had this problem before?
Should I remove the annotations and use the xml configuration rather? (would not be nice)
I am testing this on jboss-4.2.3.GA
Message was edited by: Brian Silberbauer (added jboss version)