Propagating properties in a cluster in and out App Server


EJB design: Propagating properties in a cluster in and out App Server

  1. Hi all,

    Here I come with the distributed cache problem again.
    We have some properties that need to be cluster-updated when a (admin) client updates them and the internal and external components need to be notified of the changes.
    As you might expect, I got away with JMS and it's working fine, but for *external* components only. "External" are processes running in their own VM doing an specific task. (We have a Radius Server and a Telnet client among others).
    I made an "Updateable Properties" object that includes a JMS client that subscribes to the the updates in groups of properties and a Listener queue where my client components can subscribe for changes. When you request the 'Updateable Properties" for group "a.b", it subscribes itself to a topic on a JMS queue where the updates are posted. Using Message Filter, I subscribe to "a" and "a.b". So far everything works fine... outside the app. server.

    Inside the App.Server (WL) I also need to notify some objects (logging) that some properties have changed. The Updateable Property object should here make use of a MDB to subscribe to the queue, but I can't specify at runtime the Message Filter I require. I can't neither create a MDB for each subscribtion I make. What are my options? The Message Driven Bean Proxy looks like a solution but in the discussion they discourage its use for Topics. Is there another way? Why MDB's have the Message Filter on the descriptor...? I need it at runtime!

    Any options?

    Kind regards,

  2. Why don't you use some simple callback techniques? Register the local components which want to be notified on changes at the UpdateableProperties instance, and then call them back (most simple via normal method invocation on the home interface).

    Might this work for you?

  3. That would be the solution in case of a single instance, but in a Cluster env. you need to communicate with the peers to notify of the updates. JMS seems to be the solution for it, but as I mentioned before, my client solution shouldn't be used inside the EJB container (it would work, but endangers the thread management of the container itself (WL6.1)).

    I'm working in a combination of MDB with local objects to find a solution for this, but I haven't put all together yet.

    I appreciate any suggestions,