I just don't have the API call you're referring to :
((SqlMapClientDaoSupport) myDaoHandle).get....()
I just don't see the getCacheModel() method. I know it's there but which
handle do I use to call it ? I checked the iBATIS pdfs. Just doesn't contain
this information.
Rob Sonke wrote:
>
> 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 !
>>
>
>
--
View this message in context: http://www.nabble.com/how-do-I-get-the-handle-to-my-CacheModel...-tp19804087p19868096.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
|