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

SimpleAccoutRealm concurrency access to roles and users

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.0
    • 1.2.2
    • Realms
    • None
    • Apache Tomcat 6.0.35, Win 7 x64, JDK 1.6.0_32 x64

    Description

      I'm using a PropertiesRealm which automatically reload Users and roles if the resource has been modified.
      And i noticed that authenticating an user and reloading properties file in the same time, authenticating do not wait for reloading to be finished.

      Should not SimpleAccountRealm be refactored in order to lock authentication while modifying users / roles?

      We should simply acquire a Mutex in order to retrieve users / roles or adding / removing users?

      An other way to ensure concurrency should be to use Collections.synchronizedMap() for users' map and roles' map, but while reloading resource, authentications won't wait for the reloading to be finished.

      I can do required changes if it helps

      Attachments

        1. shiro_379.diff
          19 kB
          Jono Morris

        Activity

          People

            Unassigned Unassigned
            coxalass Ludovic Garcia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: