1. Beehive
  2. BEEHIVE-1100

page flow shared by two threads can be destroyed by one but isn't reinitialized by the other


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0, 1.0.1, 1.0.2
    • Fix Version/s: None
    • Component/s: NetUI
    • Labels:


      This is a JPF threading issue where two threads can start off sharing the same Page Flow. When one thread destroys that JPF, the second thread continues to reuse the destroyed instance. This can cause problems when re-running the destroyed JPF because any Controls or other fields cleared in the "onDestroy" lifecycle handler can cause unexpected exceptions / behavior. For example:

      Thread 1: current page flow is /a/A.jpf
      1: reference /a/A.jpf
      2: execute action "step 2"
      5: attempt to execute action "step 3" – strange behavior because
      internal state has been whacked by "destroy".

      Thread 2: current page flow is /a/A.jpf
      3: reference /a/A.jpf
      4: forward to /b/B.jpf – causes onDestroy to be called on A.jpf

      I believe that the fix is to have the Thread1 re-create the JPF mid-request. This means that Thread1 will lose the state /a/A.jpf, but in the current architecture, that makes sense because the JPF was destroyed. When the JPF is re-created, it will attempt to run action "step2" which could work but might also fail with an error or redirect to the beginning of a wizard (for example). Fortunately, this scenario is the same as the case where the user types this into their browser window:


      and the action either works or fails. It's just like starting a JPF over again in the middle of the request.


        Eddie O'Neil created issue -
        Eddie O'Neil made changes -
        Field Original Value New Value
        Fix Version/s [ 12310718 ]
        Assignee Eddie O'Neil [ ekoneil ]


          • Assignee:
            Eddie O'Neil
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: