Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-383

Member variable name incorrect (sessionDAO.activeSessionCache) in docs for: EnterpriseCacheSessionDAO

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Documentation, Web Site
    • Labels:
      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bhamail Dan Rollo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: