1 Reply Latest reply on Aug 3, 2002 3:07 PM by juha

    Retrieving "lost" notificationlisteners

    Marius Krabset Newbie

      I am trying to create a small module for posting messages to topics in configurable intervals using the jmx timer-service.
      It's intended to be a service for keeping a larger system 'alive' using message-driven beans to perform various maintenance-operations like flushing time-limited cached objects, moving messages between queues, updating cached data from databases etc. I don't like to use unmanaged threads.

      I've created a web-application for creating/registering notifications and listeners/filters to the timer-service.

      My problem is the following:
      If I have registered some notifications and timers, and then do a hot-deployment of the application, I would like to remove the old registrations. The notifications are no problems, I just use getNotificationIDs and removeNotification. But what about the old listeners ?
      How do I find and remove a NotificationListener from the MBeanServer?
      Do I have to bind it to an ObjectName and register it on the MBeanServer, or is there some way of finding them anyway?

      By the way. If anybody have a better suggestion of how to distribute such 'tick'-messages to topics at pre-defined time-intervals I would appreciate letting me know.


        • 1. Re: Retrieving "lost" notificationlisteners

          AFAICR, we don't expose the registered listeners of notification broadcasters automatically to you. So you're more or less on your own and need to implement the functionality yourself.

          The same request has come up before, so maybe it would be worth considering for our server implementation. Something to the TODO list.

          If anyone is interested in putting some hours in implementing it and contributing the code, send an email.

          -- Juha