Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3200 Struts 2/OGNL/XWork performance
  3. WW-3204

Replace synchronized section in AnnotationActionValidatorManager.getValidators with a ReentrantReadWriteLock implementation

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.8
    • Fix Version/s: 2.1.8
    • Component/s: None
    • Labels:
      None

      Description

      something like:

      lock.readLock().lock();
      try {
      if (validatorCache.containsKey(validatorKey)) {
      if (FileManager.isReloadingConfigs()) {
      lock.writeLock().lock();
      try

      { if (validatorCache.containsKey(validatorKey)) validatorCache.put(validatorKey, buildValidatorConfigs(clazz, context, true, null)); }

      finally

      { lock.writeLock().unlock(); }

      }
      } else {
      lock.writeLock().lock();
      try

      { if (!validatorCache.containsKey(validatorKey)) validatorCache.put(validatorKey, buildValidatorConfigs(clazz, context, false, null)); }

      finally

      { lock.writeLock().unlock(); }

      }
      } finally

      { lock.readLock().unlock(); }

        Attachments

          Activity

            People

            • Assignee:
              musachy Musachy Barroso
              Reporter:
              musachy Musachy Barroso
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: