MIFOSX-259: make so loanTenantById gets cached correctly - also introduce delegatingCacheManager to allow us to introduce api and configuration to support switching cache solution runtime. At present caching is disabled through use of NoOpCacheManager.

This commit is contained in:
Keith Woodlock
2013-09-11 20:51:43 +01:00
parent 822eea631f
commit 5d94776c56
15 changed files with 360 additions and 160 deletions
@@ -24,8 +24,6 @@
<tx:annotation-driven />
<cache:annotation-driven />
<context:component-scan base-package="org.mifosplatform.accounting.*,
org.mifosplatform.commands.handler.*,
org.mifosplatform.commands.service.*,
@@ -17,10 +17,10 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
p:cacheManager-ref="ehcache" />
<bean id="ehcacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
p:cacheManager-ref="ehcacheInstance" />
<bean id="ehcache"
<bean id="ehcacheInstance"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
p:configLocation="classpath:/META-INF/spring/ehcache.xml" p:shared="true" />
@@ -29,11 +29,12 @@
<beans:property name="realmName" value="Mifos Platform API" />
</beans:bean>
<!--
<beans:bean id="basicAuthenticationProcessingFilter" class="org.mifosplatform.infrastructure.security.filter.TenantAwareBasicAuthenticationFilter" depends-on="cacheManager">
<beans:constructor-arg ref="authenticationManager" />
<beans:constructor-arg ref="basicAuthenticationEntryPoint" />
</beans:bean>
-->
<beans:bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder">
<beans:constructor-arg value="256"/>
</beans:bean>