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:[EMAIL PROTECTED]
Sent: vrijdag 6 oktober 2006 7:20
To: [email protected]
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.

Reply via email to