Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-703

Add cache value to event objects

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Blocker Blocker
    • 4.2.0.ALPHA4
    • 4.2.0.ALPHA3
    • Listeners
    • None

      While implementing a @CacheEntryActivated event handler I encountered an issue where fetching the newly activated value from the cache triggers another activated event, which manifests itself as an infinite loop.

      The workaround for this was to retrieve a cache value directly from the DataContainer, rather than via the Cache API. This strikes me as a bit awkward and a potential gotcha for new users.

      It would be great if the cache value where available in the event itself, e.g. getValue(). This way users wouldn't have the same temptation to try to fetch the value from the cache, and potentially triggering undesired events.

        1. patch.txt
          25 kB
          Paul Ferraro

              trustin_jira Trustin Lee (Inactive)
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: