[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: Re: JCS jcache examples specifically with spring caching
From: Romain Manni-Bucau <rmannibucau () gmail ! com>
Date: 2017-01-30 17:23:55
Message-ID: CACLE=7N2hiQU691kQYnAb_hycUK+DyDjoEzqZRK1L8ZmGL-yaA () mail ! gmail ! com
[Download RAW message or body]
Not sure with spring but we have users in prod yes (we already got feedback
through tomee list / IRC / privately)
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>
2017-01-30 18:09 GMT+01:00 Tim Cronin <tim@outboundengine.com>:
> is there anyone that has used the Jcache impl of JCS?
>
>
>
> On Wed, Jan 25, 2017 at 8:48 AM, Tim Cronin <tim@outboundengine.com>
> wrote:
>
> > I'm trying to leverage Spring caching using jcs cache
> > the javadocs show only ctor for the JCSCachingManager.
> > https://commons.apache.org/proper/commons-jcs/commons-
> > jcs-jcache/apidocs/src-html/org/apache/commons/jcs/jcache/
> > JCSCachingManager.html#line.83
> >
> > but i pass in what seems more like default values
> >
> > public static void main(String[] args) throws Exception
> > {
> > JCSCachingProvider provider = new JCSCachingProvider();
> > Properties props = new Properties();
> >
> > CacheManager cacheMgr = new JCSCachingManager(provider,
> > JCSCachingProvider.DEFAULT_URI,
> > Thread.currentThread().getContextClassLoader(),
> > props);
> >
> > //... do cache stuff...
> >
> > cacheMgr.close();
> >
> > }
> >
> > I'm trying to fit this into an existing webapp that uses xml base
> > configuration
> > and having to set the defaults seems problematic, I'd have to wrap it to
> > get
> > proper current class load or use system which doesn't map to webapp
> loader
> >
> > Is there any reason for not having a default Ctor?
> >
> > <!-- cjs cache manager setup -->
> > <beans:bean id="cache.provider" class="org.apache.commons.jcs.
> > jcache.JCSCachingProvider"/>
> > <beans:bean id="cache.url" class="org.apache.commons.jcs.
> > jcache.JCSCachingProvider.DEFAULT_URI"/>
> > <!-- this seems hacky should be a -->
> > <beans:bean id="cache.classloader" class="java.lang.Class"
> > factory-method="getSystemClassLoader" />
> > <beans:bean id="cache.properties" class="java.util.Properties"/>
> >
> > <beans:bean id="cache.manager" class="org.apache.commons.jcs.
> > jcache.JCSCachingManager">
> > <beans:constructor-arg ref="cache.provider" />
> > <beans:constructor-arg ref="cache.url" />
> > <beans:constructor-arg ref="cache.classloader" />
> > <beans:constructor-arg ref="cache.properties" />
> > </beans:bean>
> >
> >
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic