Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-8413

SpringRegisterableItemsFactory.processHandlers() should be synchronized

    Details

    • Sprint:
      2019 Week 14-16
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      SpringRegisterableItemsFactory.processHandlers() should only be called once.

      However, under certain conditions (PER_REQUEST runtime strategy, high load), it can happen that the method is called concurrently by different threads leading to race conditions.

      Possible fix:

      private volatile Object initialized = null;
      
      protected void processHandlers() {
          Object result = initialized;
          if (result == null) {
              synchronized (this) {
                  if (initialized == null) {
                      [....]
                      initialized = new Object();
                  }
              }
          }
      }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swiderski.maciej Maciej Swiderski
                Reporter:
                bernard.tison Bernard Tison
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: