Jetspeed 2
  1. Jetspeed 2
  2. JS2-1088

UserInfoManager implementation needs inprovements in resolving mapped user attributes and its cache handling

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.2.0
    • Fix Version/s: 2.1.4, 2.2.1
    • Component/s: Container
    • Labels:
      None

      Description

      The UserInfoManager currently doesn't properly maintain a cache of mapped (linked) attributes for a portlet application as there are some bugs in the code.
      Furthermore, I discovered the UserInfoManager didn't work when logging was set to DEBUG (it throws a NPE then).

        Activity

        Hide
        Ate Douma added a comment -

        I've refactored the code a bit and added a caching solution which should improve performance considerably.
        What remains to be improved is dealing with registry changes with regards to the user attribute mapping which requires invalidation for the cache entries.
        Furthermore, the changes still need to be back ported to the 2.1.4 branch.
        Leaving this issue open until those tasks are completed as well.

        Show
        Ate Douma added a comment - I've refactored the code a bit and added a caching solution which should improve performance considerably. What remains to be improved is dealing with registry changes with regards to the user attribute mapping which requires invalidation for the cache entries. Furthermore, the changes still need to be back ported to the 2.1.4 branch. Leaving this issue open until those tasks are completed as well.
        Hide
        Ate Douma added a comment -

        I've implemented cache invalidation handling now too through a RegistryEventListener implemented by the UserInfoManager itself which will clear cached user attribute map definition on portlet application change or removal.

        For the back port to Jetspeed 2.1.4, almost all 2.2.1 code could be reused (without generics) except that 2.1.4 still is based off Java Preferences back end storage.
        To reproduce logic similar to what is used for 2.2.1, which provides direct access to a logged on user infoMap through its UserPrincipal, for 2.1.4 I've implemented a similar session backed user InfoMap based on one-time loading of the User preferences.

        Show
        Ate Douma added a comment - I've implemented cache invalidation handling now too through a RegistryEventListener implemented by the UserInfoManager itself which will clear cached user attribute map definition on portlet application change or removal. For the back port to Jetspeed 2.1.4, almost all 2.2.1 code could be reused (without generics) except that 2.1.4 still is based off Java Preferences back end storage. To reproduce logic similar to what is used for 2.2.1, which provides direct access to a logged on user infoMap through its UserPrincipal, for 2.1.4 I've implemented a similar session backed user InfoMap based on one-time loading of the User preferences.
        Hide
        Ate Douma added a comment -

        Issue resolved. I also back ported the 2.1.4 fixes to the 2.1.3-postrelease branch.

        Show
        Ate Douma added a comment - Issue resolved. I also back ported the 2.1.4 fixes to the 2.1.3-postrelease branch.

          People

          • Assignee:
            Ate Douma
            Reporter:
            Ate Douma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development