JMX NotificationEmitter problem: addNotificationListener of the Module is not invoked

Hi,

I’m successfully connecting to a custom module through a JMX client, I can invoke methods remotely without problems.

Now I’d like to have the module emits notifications to the client.

The module is declared as follows:

public class StreamManager extends ModuleBase implements NotificationEmitter

I’ve provided an implementation for the methods declared in the interface (the implementation actually delegates to a private NotificationBroadcasterSupport object).

On the client side I connect to the module and add a notification listener:

mbeanServerConnection.addNotificationListener(streamManagerObjectName, myListener, null, null);	       

However, the addNotificationListener of the module (StreamManager) is never invoked and therefore notifications are not delivered.

Might there be any reason that prevents addNotificationListener of the module to be invoked?

Thanks for any help

The Notification node of the module instance in Jconsole appears empty, so It seems that the Module does not expose the Notifications (getNotificationInfo() is not called?) it can broadcast.

That’s probably why the addNotificationListener of the module is not called.

Any help why?

Thanks

I’m not sure how to help with this. Have you seen this article?

https://www.wowza.com/docs/how-to-expose-an-attribute-or-method-of-a-custom-application-module-through-jmx-jconsole

Richard

Method invokation works fine through a jmx connection to the Module, but I think the Module cannot emit notifications.

I’ve encapsulated all the code in a mbean that I’ve registered manually in the Module onAppStart method, this way notifications work.

Thanks.