I was able to configure Shiro+Spring+Ehcache+SpringRemoting. everything is
working fine. But I have problem with forcing Shiro to read ehcahe config
from file with custom cache name. below my Spring app contex config example

<bean id="securityManager"
class="org.apache.shiro.web.DefaultWebSecurityManager">
        <property name="cacheManager" ref="cacheManager"/>
        <property name="realm" ref="jdbcRealm"/>
        <property name="sessionMode" value="native"/>
    </bean>

    <bean id="cacheManager"
class="org.apache.shiro.cache.ehcache.EhCacheManager">
        <property name="cacheManagerConfigFile"
value="file:${webapp.root}/WEB-INF/ehcache.xml"/>
    </bean>
    
    <bean id="jdbcRealm" class="com.springbook.MyWebRealm">
        <property name="authorizationCacheName" value="realmsCache"/>
        <property name="dataSource" ref="dataSource"/>
        <property name="credentialsMatcher">
            <bean
class="org.apache.shiro.authc.credential.Sha256CredentialsMatcher">
                <property name="storedCredentialsHexEncoded" value="false"/>
                <property name="hashSalted" value="true"/>
            </bean>
        </property>
    </bean>

I was able to force to read custom cache for "jdbcRealm" (see:
authorizationCacheName property)

but how I can do it for "securityManager". by deafault it create cache with
some predefined way and setting. But I'd like to cutomise it behavior
-- 
View this message in context: 
http://n2.nabble.com/Web-Spring-EhCache-how-to-change-default-cache-name-tp4063126p4063126.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to