@CacheResult - local, distributed or replicated

33 views
Skip to first unread message

Will

unread,
Jul 3, 2012, 4:28:54 PM7/3/12
to jsr...@googlegroups.com
Hi,

If a method is annotated with @CacheResult and a cache name is not specified what is the cache type of the auto-generated cache based on the method signature? i.e. is it local, distributed or replicated?

Thanks, 
W

Eric Dalquist

unread,
Jul 3, 2012, 4:45:27 PM7/3/12
to jsr...@googlegroups.com
A cache isn't auto generated, a cache name is auto generated and that
named cache is retrieved from the CacheManager so you still need to
configure the cache in the cache manager.

Ryan Gardner

unread,
Jul 3, 2012, 5:28:48 PM7/3/12
to jsr...@googlegroups.com
According to the spec, 

With no {@link #cacheName()} specified a cache name of "my.app.DomainDao.getDomain(java.lang.String,int)"
* will be generated.



The JSR107 API doesn't have a concept of local, distributed, or replicated - that's up to the cache configuration. If you have it create a generated cache, it'd be a cache of whatever type your cachemanager creates by default.

Ryan

Reply all
Reply to author
Forward
0 new messages