Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2.1
-
None
-
None
Description
In the 'Session Management' docs, under heading: EnterpriseCacheSessionDAO, the example ini settings snippet following 'For example, in shiro.ini:' cause an error (http://shiro.apache.org/session-management.html#SessionManagement-%257B%257BEnterpriseCacheSessionDAO%257D%257D).
SEVERE: Exception sending context initialized event to listener instance of class org.apache.shiro.web.env.EnvironmentLoaderListener
org.apache.shiro.config.ConfigurationException: Property 'activeSessionCache' does not exist for object of type org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO.
at org.apache.shiro.config.ReflectionBuilder.isTypedProperty(ReflectionBuilder.java:252)
I think the variable named used is incorrect:
sessionDAO.activeSessionCache
because no such field/setter exists.
However, changing the variable name to:
sessionDAO.activeSessionsCache
appears to work. For consistency, it should probably be changed everywhere it is used in that example snippet (3 places):
This:
#This implementation would use your preferred distributed caching product's APIs:
activeSessionCache = my.org.apache.shiro.cache.CacheImplementation
sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO
sessionDAO.activeSessionCache = $activeSessionCache
securityManager.sessionManager.sessionDAO = $sessionDAO
becomes this:
#This implementation would use your preferred distributed caching product's APIs:
activeSessionsCache = my.org.apache.shiro.cache.CacheImplementation
sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO
sessionDAO.activeSessionsCache = $activeSessionsCache
securityManager.sessionManager.sessionDAO = $sessionDAO