All-- I've run across a new Page Flow threading issue that relates to page flows used between threads affecting each other. This can lead to errant NPEs / etc in user code when a page flow shared between two threads is destroyed by one thread. For example, the following can occur (the numbers in the steps are absolute in time):
Thread 1: current page flow is /a/A.jpf 1: reference /a/A.jpf 2: execute action "step 2" and forward to step2.jsp 5: attempt to render page step2.jsp -- by this time, the JPF has been destroyed (see step 4) which can cause strange behavior as A.jpf's internal state has been affected by the destroy lifecycle method 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 Because Thread2 can cause "destroy" to be executed on the JPF in use by Thread1, Thread1 may experience unexpected behavior because "destroy" causes Controls to be nulled and may alter additional fields in user code from the onDestroy lifecycle callback. There seem to be a couple of ways to fix this: 1) ignore the problem and let the exceptions happen 2) attempt to re-create the JPF and then execute an action or render a page using this new instance 3) detect the fact that the JPF has been destroyed and abort the request I'm inclined to implement (2) above but am curious if anyone has additional ideas... Thanks! Eddie
