[
https://issues.jboss.org/browse/ISPN-1263?page=com.atlassian.jira.plugin....
]
Mircea Markus updated ISPN-1263:
--------------------------------
Fix Version/s: 6.0.0.Final
(was: 5.2.0.Final)
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
Fix For: 6.0.0.Final
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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira