[infinispan-issues] [JBoss JIRA] Updated: (ISPN-1263) Type safe selection of cache used by the JCache interceptors
Kevin Pollet (JIRA)
jira-events at lists.jboss.org
Fri Jul 22 10:23:23 EDT 2011
[ https://issues.jboss.org/browse/ISPN-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Pollet updated ISPN-1263:
-------------------------------
Summary: Type safe selection of cache used by the JCache interceptors (was: Allow type safe selection of the cache used by the JCache interceptors)
Description:
Currently the name of the cache which will be used by the JCache interceptors has to be specified in JCache annotations (e.g. {{@CacheResult(cacheName="greeting-cache"}})).
This can be error prone (typo, refactoring ...). The CDI integration module provides the possibility to associate a qualifier to a cache. This qualifier could be re-used to provide a type safe selection of the cache used by a JCache interceptor. Something like:
{code}
public class GreetingService {
@CacheResult @GreetingCache
public String greet(String name) {
return "Hello" + name;
}
}
{code}
Here we need to be in sync with JCache specification. In my understanding of the spec the cache name is required for {{@CacheRemoveEntry}} and {{@CacheRemoveAll}} (but currently in the API there is a default value initialized to blank). For {{@CacheResult}} if no cache name is defined a default one is used.
was:
Currently the name of the cache which will be used by the JCache interceptors has to be specified in JCache annotations (e.g {{@CacheResult(cacheName="greeting-cache"}}).
This can be error prone (typo, refactoring ...). The CDI integration module provides the possibility to associate a qualifier to a cache. This qualifier could be re-used to provide a type safe selection of the cache used by a JCache interceptor. Something like:
{code}
public class GreetingService {
@CacheResult @GreetingCache
public String greet(String name) {
return "Hello" + name;
}
}
{code}
Here we need to be in sync with JCache specification. In my understanding of the spec the cache name is required for {{@CacheRemoveEntry}} and {{@CacheRemoveAll}} (but currently in the API there is a default value). For {{@CacheResult}} if no cache name is defined a default one is used.
> Type safe selection of cache used by the JCache interceptors
> ------------------------------------------------------------
>
> Key: ISPN-1263
> URL: https://issues.jboss.org/browse/ISPN-1263
> Project: Infinispan
> Issue Type: Feature Request
> Components: CDI integration
> Reporter: Kevin Pollet
> Assignee: Kevin Pollet
> Priority: Minor
>
> Currently the name of the cache which will be used by the JCache interceptors has to be specified in JCache annotations (e.g. {{@CacheResult(cacheName="greeting-cache"}})).
> This can be error prone (typo, refactoring ...). The CDI integration module provides the possibility to associate a qualifier to a cache. This qualifier could be re-used to provide a type safe selection of the cache used by a JCache interceptor. Something like:
> {code}
> public class GreetingService {
> @CacheResult @GreetingCache
> public String greet(String name) {
> return "Hello" + name;
> }
> }
> {code}
> Here we need to be in sync with JCache specification. In my understanding of the spec the cache name is required for {{@CacheRemoveEntry}} and {{@CacheRemoveAll}} (but currently in the API there is a default value initialized to blank). For {{@CacheResult}} if no cache name is defined a default one is used.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list