[infinispan-issues] [JBoss JIRA] (ISPN-2181) Allow to inject the current cache into Mapper/Reducer/Callable objects
Vladimir Blagojevic (JIRA)
jira-events at lists.jboss.org
Wed Aug 22 09:40:14 EDT 2012
[ https://issues.jboss.org/browse/ISPN-2181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713032#comment-12713032 ]
Vladimir Blagojevic commented on ISPN-2181:
-------------------------------------------
{quote}Hmm, I guess you can't use the default creational context. You can probably just wrap CreationalContext and add some additional field to it, and then cast it. If this breaks Weld, it's a bug in Weld, and we can look at other options{quote}
What do you mean exactly? How can I do this after I create CreationalContext instance using BeanManager's createCreationalContext method? Do you mean to wrap that instance with a new instance of a class I write (which implements CreationalContext and has extra cache field) and that instance I cast then in create callback of ContextualLifecycle of the bean?
> Allow to inject the current cache into Mapper/Reducer/Callable objects
> ----------------------------------------------------------------------
>
> Key: ISPN-2181
> URL: https://issues.jboss.org/browse/ISPN-2181
> Project: Infinispan
> Issue Type: Enhancement
> Components: CDI integration
> Affects Versions: 5.1.5.FINAL, 5.2.0.ALPHA2
> Reporter: Nicolas Filotto
> Assignee: Vladimir Blagojevic
> Fix For: 5.2.0.Alpha4, 5.2.0.Final
>
>
> Thanks to ISPN-1636, it is now possible to inject the cache into Mapper/Reducer/Callable objects however the cache injected is the default cache not the cache for which the MapReduceTask/DistributedExecutorService has been created which is quite error prone since we don't expect to get the default cache but the current cache.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list