Nevermind, it was a ehcache configuration problem. I was wrong about the cause. The onLogout method wasn't called because there wasn't any subject associated with the request due to a ehcache misconfiguration. Simply, you can't use the default ehcache configuration to support session sharing among several webapps. You need to provide a ehcache.xml like the fav's one in this thread <http://shiro-user.582556.n2.nabble.com/Shiro-and-multiple-wars-within-the-same-Servlet-Container-td5560737.html#a5563334> , and tell ehcache to use that file accordingly:
shiro.ini: ... ssoCacheManager.cacheManagerConfigFile = classpath:ehcache.xml ... ehcache.xml: <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true" monitoring="autodetect" dynamicConfig="true"> <diskStore path="java.io.tmpdir" /> <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory" properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=1" propertySeparator="," /> <cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" /> <cache name="shiro-activeSessionCache" maxElementsInMemory="600" eternal="true" overflowToDisk="true" memoryStoreEvictionPolicy="LFU"> <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" /> </cache> <defaultCache maxElementsInMemory="100" eternal="true" overflowToDisk="true" memoryStoreEvictionPolicy="LFU"> </defaultCache> </ehcache> -- View this message in context: http://shiro-user.582556.n2.nabble.com/onLogout-implementation-in-AuthenticatingRealm-subclass-doesn-t-get-called-tp7577801p7577803.html Sent from the Shiro User mailing list archive at Nabble.com.
