When I configure *iBATIS* sql maps to get loaded through
SqlMapClientFactoryBean the chache models are not loaded properly.

I have confiugred my *iBATIS* SQL Map config and sql map files as following,

<bean id="sqlMap"
class="org.springframework.orm.ibatis.SqlMapClient FactoryBean">
<property name="configLocation">
<value>classpath:SqlMapConfig.xml</value>
</property>
<property name="mappingLocations"
value="classpath:com/app/business/sqlmaps/*SQLMap.xml" />
<property name="dataSource" ref="dataSource" />
</bean>

I tried debugging *iBATIS* code and ultimately found out that whenever the
mappings are loaded through SqlMapClientFactoryBean, *iBATIS*'s
wireUpCacheModel is called before the actual cacheModels are built.
Therefore the cache does not get flushed on the specified statements.
However if I load SQL map files through Sql Map config file everything works
fine !

Regards,
Jatan

Reply via email to