ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Sonke <...@tigrou.nl>
Subject Re: how do I get the handle to my CacheModel...
Date Fri, 03 Oct 2008 19:36:10 GMT
I don't know how to do that with properties but you can do it 
programmatically by adding a flushstatement:
daoObject.getSqlMapExecutorDelegate().getCacheModel(modelName).addFlushTriggerStatement("Foo.insertFoo");

Never tried it actually but it should work.


Shantanu Upadhyaya wrote:
> Either my search skills are getting bad or the iBatis documentation is not
> adequate.
>
> 1. I'd like to call setFlushInterval(..) using a configurable parameter
> which can change while the application is running. How do I get the handle
> to my already defined Cache model ?
>
> 2. How do I add a parameter placeholder in my SQL Map file ...I would want
> something like this ?
>
> 	<cacheModel id="xxxLRUCache" type="LRU">
> 		<flushInterval hours="${app.config.value}"/>
> 		<property name="size" value="1" />
> 	</cacheModel>
> I'm using
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer in my
> databaseContext.xml. That works with <bean...>....</bean> . But it will not
> work with the SQL Map file.
>
> 3. Is there any way to keep the cache ready before being called for the
> first time ? Anything in iBATIS to support that ? I could configure a
> startup listener with the app server, but I'm just exploring options for
> now.
>
> Thanks !
>   

Mime
View raw message