You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by sgjava <sg...@gmail.com> on 2015/11/20 16:43:07 UTC

JCache cache visible to cache manager with JCS provider

I have Ehcache 3 working fine with JCache after adding CacheResolverFactory,
so beans and unit tests use the same cache. I'm testing JCS now and I'm
running into the issue where the configuration file doesn't create caches
visible to CacheManager. I know this isn't in the spec, but I want to do
things in a generic way. Thus, should I use CacheManager.createCache? Also,
how do I get CacheManager to use caches created with ccf configuration file?

cacheManager = cachingProvider.getCacheManager(new
File("src/config/jcache.ccf").toURI(), CacheBean.class.getClassLoader());



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JCache-cache-visible-to-cache-manager-with-JCS-provider-tp4676924.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: JCache cache visible to cache manager with JCS provider

Posted by Romain Manni-Bucau <rm...@gmail.com>.
yep

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2015-11-20 8:20 GMT-08:00 Steve Goldsmith <sg...@gmail.com>:
> So, if I use the same cache name in createCache as in ccf it will pick up
> the ccf configuration for that cache?
>
> On Fri, Nov 20, 2015 at 11:02 AM, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
>> JCache sees caches you create through JCache so yes createCache().
>> createCache will respect ccf if it is the question.
>>
>> Romain Manni-Bucau
>> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>>
>>
>> 2015-11-20 7:43 GMT-08:00 sgjava <sg...@gmail.com>:
>> > I have Ehcache 3 working fine with JCache after adding
>> CacheResolverFactory,
>> > so beans and unit tests use the same cache. I'm testing JCS now and I'm
>> > running into the issue where the configuration file doesn't create caches
>> > visible to CacheManager. I know this isn't in the spec, but I want to do
>> > things in a generic way. Thus, should I use CacheManager.createCache?
>> Also,
>> > how do I get CacheManager to use caches created with ccf configuration
>> file?
>> >
>> > cacheManager = cachingProvider.getCacheManager(new
>> > File("src/config/jcache.ccf").toURI(), CacheBean.class.getClassLoader());
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://tomee-openejb.979440.n4.nabble.com/JCache-cache-visible-to-cache-manager-with-JCS-provider-tp4676924.html
>> > Sent from the TomEE Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Steven P. Goldsmith

Re: JCache cache visible to cache manager with JCS provider

Posted by Steve Goldsmith <sg...@gmail.com>.
So, if I use the same cache name in createCache as in ccf it will pick up
the ccf configuration for that cache?

On Fri, Nov 20, 2015 at 11:02 AM, Romain Manni-Bucau <rm...@gmail.com>
wrote:

> JCache sees caches you create through JCache so yes createCache().
> createCache will respect ccf if it is the question.
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>
>
> 2015-11-20 7:43 GMT-08:00 sgjava <sg...@gmail.com>:
> > I have Ehcache 3 working fine with JCache after adding
> CacheResolverFactory,
> > so beans and unit tests use the same cache. I'm testing JCS now and I'm
> > running into the issue where the configuration file doesn't create caches
> > visible to CacheManager. I know this isn't in the spec, but I want to do
> > things in a generic way. Thus, should I use CacheManager.createCache?
> Also,
> > how do I get CacheManager to use caches created with ccf configuration
> file?
> >
> > cacheManager = cachingProvider.getCacheManager(new
> > File("src/config/jcache.ccf").toURI(), CacheBean.class.getClassLoader());
> >
> >
> >
> > --
> > View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/JCache-cache-visible-to-cache-manager-with-JCS-provider-tp4676924.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
>



-- 
Steven P. Goldsmith

Re: JCache cache visible to cache manager with JCS provider

Posted by Romain Manni-Bucau <rm...@gmail.com>.
JCache sees caches you create through JCache so yes createCache().
createCache will respect ccf if it is the question.

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2015-11-20 7:43 GMT-08:00 sgjava <sg...@gmail.com>:
> I have Ehcache 3 working fine with JCache after adding CacheResolverFactory,
> so beans and unit tests use the same cache. I'm testing JCS now and I'm
> running into the issue where the configuration file doesn't create caches
> visible to CacheManager. I know this isn't in the spec, but I want to do
> things in a generic way. Thus, should I use CacheManager.createCache? Also,
> how do I get CacheManager to use caches created with ccf configuration file?
>
> cacheManager = cachingProvider.getCacheManager(new
> File("src/config/jcache.ccf").toURI(), CacheBean.class.getClassLoader());
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/JCache-cache-visible-to-cache-manager-with-JCS-provider-tp4676924.html
> Sent from the TomEE Users mailing list archive at Nabble.com.