[jboss-user] [Management, JMX/JBoss] - Re: How to detect that a NotificationListener was lost after

aluca do-not-reply at jboss.com
Mon Jan 15 09:43:29 EST 2007


Thx for replying Dimitris.

No, the jboss server that register the Listener which is more or less the client and is remote (not the same JVM). Moreover they can be multiple clients. 

That means that if I want to use JMS, I must implement a complex mecanism of registering a client queue toward the service at client startup and unregister it when the client stops.

The notification pattern does actually fits our need as it implements a broadcasting pattern from service to clients. We just added a keepalive mecanism (a simple methode of the MBean) that the clients calls on a regular basis indicating its "signature" as a parameter. Then the service (service MBean) dig into the listener registery to findout if the listener is still their and return true if ok.

The problem is that there is no getter to the listener registery.

As explained in my first post, we currently overrode the methodes that access to the registery attribute of the  JBossNotificationBroadcasterSupport class to get access to a ListenerRegistry attribute which is also redefined. That way we can monitor what listener is still there and which disapeared. We identify the listeners using their handback "signature" attribute in which we put a id string (hostname + ...). 

The issue is if we further upgrade to a newer version of jboss we could encounter maintenace problem as the listener mecanism could evolve.



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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001806



More information about the jboss-user mailing list