ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: Overrule caching rules ...
Date Sat, 07 Oct 2006 09:31:25 GMT
You could do something like the following:

 

Properties props = new Properties();

props.setProperty("cache.enabled",
System.getProperty("ibatis.cache.enabled", true));

DaoManagerBuilder.buildDaoManager(Resources.getResourceAsReader('bla.xml
'), props);

 

In your sqlmapconfig:

 

<sqlMapConfig>

<settings cacheModelsEnabled="${cache.enabled}">

</sqlMapConfig>

 

Set the system property ibatis.cache.enabled to false on the server you
don't want caching, the rest can omit the property or set it to true.

 

Hope this helps,

 

Niels

________________________________

From: Tom Stroobants [mailto:Tom.Stroobants@persgroep.be] 
Sent: vrijdag 6 oktober 2006 7:20
To: user-java@ibatis.apache.org
Subject: Overrule caching rules ...

 

Hello ...

 

We have the following situation ... We deploy our application in
different servers and caching is enabled in the iBATIS xml files. On one
server however we want to disable iBATIS caching but without changing
the xml files ...

 

Is there some parameter, option, I don't know what that you can use with
iBATIS to overrule the caching configuration ?

 

Thanks in advance ...

 

Best regards,

 

Tom.


Mime
View raw message