[infinispan-issues] [JBoss JIRA] Resolved: (ISPN-703) Add cache value to event objects
Trustin Lee (JIRA)
jira-events at lists.jboss.org
Wed Oct 20 09:06:54 EDT 2010
[ https://jira.jboss.org/browse/ISPN-703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Trustin Lee resolved ISPN-703.
------------------------------
Resolution: Done
The proposed patch has been applied with one change: because CacheEntryCreatedEvent doesn't have a value, CacheEntryEvent.getValue() has been pushed down to the event types where having a value property makes sense. Therefore, to access the value of an event, you have to cast correctly or have to specify the event handler method's parameter type correctly.
I ran CacheNotifierTest and CacheNotifierImplTest and they all pass, but please let me know if my change caused any regression.
I also put several FIXMEs to the code. I'll post something related to infinispan-dev about them soon.
> Add cache value to event objects
> --------------------------------
>
> Key: ISPN-703
> URL: https://jira.jboss.org/browse/ISPN-703
> Project: Infinispan
> Issue Type: Feature Request
> Components: Listeners
> Affects Versions: 4.2.0.ALPHA3
> Reporter: Paul Ferraro
> Assignee: Trustin Lee
> Priority: Blocker
> Fix For: 4.2.0.BETA1
>
> Attachments: patch.txt
>
>
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list