1 Reply Latest reply on Jul 8, 2010 1:55 PM by Brian Oliver-Oracle

    Push Replication and JMX problem

      When I register a publisher for a cache like this...
      pushReplicationManager.registerBatchPublisher(cacheName, name, publisher);
      ... does the name parameter need to be unique for the cluster?

      If is it not unique everything works fine and I still get the correct publishers created for each cache. The problem I get is that I cannot see the publishers in JMX as the name of the MBean only uses the subscriberIdentidier (i.e. the name parameter above). Each time I call the code above to create a new publisher for a new cache but using the same name parameter in JMX I can only see the latest MBean created.

      Currently the code in PublishingSubscriptionBackingMapListener.onBackingMapEvent registers the MBean like this:
      String mBeanName = registry.ensureGlobalName("type=PublishingService,id=" 
                                 + publishingSubscription.getIdentifier().getSubscriberIdentifier());
      I overrode this and changed it to use both the destination and subscriber Id like this:
      String name = "type=PublishingService,destId="
             + publishingSubscription.getIdentifier().getDestinationIdentifier()
             + ",subId="
             + publishingSubscription.getIdentifier().getSubscriberIdentifier();
      String mBeanName = registry.ensureGlobalName(name);
      and now I can see all my publishers in JMX.

      So, is my override a valid thing to do or should I use unique name parameters to registerBatchPublisher?

        • 1. Re: Push Replication and JMX problem
          Brian Oliver-Oracle
          Hi Jonathan,

          Thanks for highlighting the issue. As Push Replication now uses a combination of the cache and publisher name to register JMX this should no longer be an issue.

          Let me know if it is.

          -- Brian

          Brian Oliver | Architect | Oracle Coherence Engineering
          Oracle Fusion Middleware