Per Mike on the mailing list:
Hi Lance and others,
I think we discussed the solution for this quite a long time ago on the mailing list, when talking about how to make engine.js static for 3.0 (previously the script session id was merged into a dynamically generated engine.js).
IIRC it goes something like this:
*
When the page is loaded there will be no script session id, neither before or after the inclusion of engine.js.
*
The first remote call from the DWR layer will be done in |ordered| mode (an existing feature in DWR) to ensure that no other call takes place until it returns. As it will send a null scriptSessionId to the server, it will create a new id and return back to the client, so the id can be set in the DWR client layer for the remainder of the page lifetime.
*
The first remote call (for this page's lifetime) could be the user code's first remote call, the first Reverse Ajax poll, or the System.pageLoaded call.
*
After the script session id has been set the DWR client layer can go back to normal/non-ordered mode.
If things haven't changed since we discussed this, I think this is the correct way to implement/correct this feature.
Best regards
Mike
Per Mike on the mailing list:
Hi Lance and others,
I think we discussed the solution for this quite a long time ago on the mailing list, when talking about how to make engine.js static for 3.0 (previously the script session id was merged into a dynamically generated engine.js).
IIRC it goes something like this:
*
When the page is loaded there will be no script session id, neither before or after the inclusion of engine.js.
*
The first remote call from the DWR layer will be done in |ordered| mode (an existing feature in DWR) to ensure that no other call takes place until it returns. As it will send a null scriptSessionId to the server, it will create a new id and return back to the client, so the id can be set in the DWR client layer for the remainder of the page lifetime.
*
The first remote call (for this page's lifetime) could be the user code's first remote call, the first Reverse Ajax poll, or the System.pageLoaded call.
*
After the script session id has been set the DWR client layer can go back to normal/non-ordered mode.
If things haven't changed since we discussed this, I think this is the correct way to implement/correct this feature.
Best regards
Mike