Details

      Description

      From the forum post:

      When I add 1 listener to a cache I get one notification event per change to the cached object. When I add 2 listeners (different instances, or even two instances of listeners of different object types) I get 4 notifications for every change to a cached object. Adding the second listener behaves as though it were creating a second instance of the CacheListenerAdapter in the PojoCacheImpl adding both listeners seem to be added to both adapters (creating a cross product of 4). I say this because when I print out the context from the events (e.getContext()) I can see that the 2 duplicate event notifications are coming from two distinct CacheListenerAdapter instances.

      Is anyone else experiencing this or am I doing something very wrong? This doesn't seem to me to be correct behavior.

      Output from run with 1 listener instance:
      Node attached: org.jboss.cache.pojo.notification.event.AttachedEvent[source=1: integer]

      Event.getContext(): org.jboss.cache.pojo.impl.CacheListenerAdaptor$1@6214f5

      Output from run with 2 different instances:
      Node attached: org.jboss.cache.pojo.notification.event.AttachedEvent[source=1: integer]

      Event.getContext(): org.jboss.cache.pojo.impl.CacheListenerAdaptor$1@4d76b4
      Node attached: org.jboss.cache.pojo.notification.event.AttachedEvent[source=1: integer]
      Event.getContext(): org.jboss.cache.pojo.impl.CacheListenerAdaptor$1@4d76b4
      Node attached: org.jboss.cache.pojo.notification.event.AttachedEvent[source=1: integer]
      Event.getContext(): org.jboss.cache.pojo.impl.CacheListenerAdaptor$1@19b46dc
      Node attached: org.jboss.cache.pojo.notification.event.AttachedEvent[source=1: integer]
      Event.getContext(): org.jboss.cache.pojo.impl.CacheListenerAdaptor$1@19b46dc

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jason.greene Jason Greene
                Reporter:
                jason.greene Jason Greene
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: