« Return to Thread: Data loss within Session Script

Re: Data loss within Session Script

by Thomas Manson :: Rate this Message:

Reply to Author | View in Thread

After a while, on first regular ajax call of the left window I get :
 
2008-04-20 18:10:13,203 DEBUG [http-8080-Processor25] (DefaultWebContext.java:98) - ScriptSession re-sync: 4E3B859DF2333F3A33DB5285E7A11C18 has become 1DE83D4C2B7B26D6D9EDD64949CB5BC9
 
and the issue mentionned in my last mail with no data detected.
 
After a refresh of the left window I see :
 
2008-04-20 18:12:11,062 DEBUG [http-8080-Processor25] (DefaultWebContext.java:98) - ScriptSession re-sync: has become 32116B9CE91E9F836373D83DF2A0FEDE
 
Notice, that both left and right window has the chatroomId set in their script session, so, it should always be there.
 
Thomas

 

 
 


 
On 4/20/08, Thomas Manson <dev.mansonthomas@...> wrote:
Hi,
 
I'm having some strange issue with Session Script.
 
 
My webapp is used as follow
  1. welcome screen where you can select something like a chatroom
  2. once selected, two popup windows are opened (dual screen app)
  3. Both make an initial call to set the 'chatroom id' within the script session.
  4. The left window (no reverse ajax) is used to input some data. When the input is ended, an ajax call (the "end call") is made to the server to notify all client right window that something new has been added.
The issue is :
 
1/ If I input something quickly after the two window opening, everything works ok
2/ If I wait some time doing nothing, and then input something, on the "end call", when doing a foreach on my scriptsession (to do reverse ajax) opened on the right window, I can't find the chatroomId.
3/Next to 2/ if I refresh only the left window (input) and do the input again, it works.
 
I think something is wrong with script session handling with two popup.
 
On server side I browse script session of the right window, data in script session seems lost.
But a refresh on the left windows correct the situation (ie : one window set it's id in it's left script session)
Whereas, it would be more logical that all client on right windows refresh their browser to correct the data loss.
 
I'm using DWR3 M1.
 
I'm opening the two popup from the same window, which is handy as a window can call a javascript function of the other window (via the common parent window).
 
Do you think a workaround would be : Select chatroom, navigate to new page, open one window, navigate to a new page, open an other ? (also I loose the handy cross window js call)
 
Or, all my window are implementing the a generic method and I filter the server message on client side (poor solution).
 
 
Thomas.
 

 « Return to Thread: Data loss within Session Script