Re: PushEndPoint resource class once in a while is empty
Posted: 07 Aug 2014, 18:13
[quote="kukeltje"]I don't think the problem is caused by push but by some other more generic issue.
.......
Thanks kukeltje.
I have reviewed network messages for two hours, comparing html and cookies, those when sessionId got null and push does not work against those in which sessioId is correct and push works.
In a brief I did not find difference. The only difference is directive <jsessionid>, which obviously changes in each session, and it exist in html code in both scenarios.
Lets say for example,
when works well:
<script id="j_idt9:wdaPushing_s" type="text/javascript">$(function(){PrimeFaces.cw("Socket","widget_j_idt9_wdaPushing",{id:"j_idt9:wdaPushing",widgetVar:"widget_j_idt9_wdaPushing",url:"/WDA/primepush/events/0ccbf832d7013d42077da6d71754/;jsessionid=0ccbf832d7013d42077da6d71754",autoConnect:true,transport:"websocket",fallbackTransport:"long-polling",onMessage:WDA.pushCallbackFunction,onError:function(response){WDA.pushErrorFunction}});});</script><span id="j_idt9:txt_value" style="display:none;">txt</span><script id="j_idt9:j_idt11_s" type="text/javascript">$(function(){PrimeFaces.cw("Poll","pollConnection",{id:"j_idt9:j_idt11",widgetVar:"pollConnection",frequency:22,autoStart:true,fn:function(){PrimeFaces.ab({s:'j_idt9:j_idt11',f:'j_idt9',u:'j_idt9:txt_value',ps:true,oner:function(xhr,status,error){pollConnection.stop(); alert('Closed Session'); location.reload();G_reload_page=true;G_disconnected=true;;}});}});});</script><input type="hidden" name="javax.faces.ViewState" id="j_id1:javax.faces.ViewState:0" value="-2782688223628478633:-1483531104748026338" autocomplete="off" />
when fails :
<script id="j_idt9:wdaPushing_s" type="text/javascript">$(function(){PrimeFaces.cw("Socket","widget_j_idt9_wdaPushing",{id:"j_idt9:wdaPushing",widgetVar:"widget_j_idt9_wdaPushing",url:"/WDA/primepush/events/0e618c8e793aabcd76e65b69dc3e/;jsessionid=0e618c8e793aabcd76e65b69dc3e",autoConnect:true,transport:"websocket",fallbackTransport:"long-polling",onMessage:WDA.pushCallbackFunction,onError:function(response){WDA.pushErrorFunction}});});</script><span id="j_idt9:txt_value" style="display:none;">txt</span><script id="j_idt9:j_idt11_s" type="text/javascript">$(function(){PrimeFaces.cw("Poll","pollConnection",{id:"j_idt9:j_idt11",widgetVar:"pollConnection",frequency:22,autoStart:true,fn:function(){PrimeFaces.ab({s:'j_idt9:j_idt11',f:'j_idt9',u:'j_idt9:txt_value',ps:true,oner:function(xhr,status,error){pollConnection.stop(); alert('Closed Session'); location.reload();G_reload_page=true;G_disconnected=true;;}});}});});</script><input type="hidden" name="javax.faces.ViewState" id="j_id1:javax.faces.ViewState:0" value="8162960213548174238:-3623140348150622308" autocomplete="off" />
Same with cookies, equal when works and when fails.
I you could guide something more specific to look for, I will glad to do so.
.......
Thanks kukeltje.
I have reviewed network messages for two hours, comparing html and cookies, those when sessionId got null and push does not work against those in which sessioId is correct and push works.
In a brief I did not find difference. The only difference is directive <jsessionid>, which obviously changes in each session, and it exist in html code in both scenarios.
Lets say for example,
when works well:
<script id="j_idt9:wdaPushing_s" type="text/javascript">$(function(){PrimeFaces.cw("Socket","widget_j_idt9_wdaPushing",{id:"j_idt9:wdaPushing",widgetVar:"widget_j_idt9_wdaPushing",url:"/WDA/primepush/events/0ccbf832d7013d42077da6d71754/;jsessionid=0ccbf832d7013d42077da6d71754",autoConnect:true,transport:"websocket",fallbackTransport:"long-polling",onMessage:WDA.pushCallbackFunction,onError:function(response){WDA.pushErrorFunction}});});</script><span id="j_idt9:txt_value" style="display:none;">txt</span><script id="j_idt9:j_idt11_s" type="text/javascript">$(function(){PrimeFaces.cw("Poll","pollConnection",{id:"j_idt9:j_idt11",widgetVar:"pollConnection",frequency:22,autoStart:true,fn:function(){PrimeFaces.ab({s:'j_idt9:j_idt11',f:'j_idt9',u:'j_idt9:txt_value',ps:true,oner:function(xhr,status,error){pollConnection.stop(); alert('Closed Session'); location.reload();G_reload_page=true;G_disconnected=true;;}});}});});</script><input type="hidden" name="javax.faces.ViewState" id="j_id1:javax.faces.ViewState:0" value="-2782688223628478633:-1483531104748026338" autocomplete="off" />
when fails :
<script id="j_idt9:wdaPushing_s" type="text/javascript">$(function(){PrimeFaces.cw("Socket","widget_j_idt9_wdaPushing",{id:"j_idt9:wdaPushing",widgetVar:"widget_j_idt9_wdaPushing",url:"/WDA/primepush/events/0e618c8e793aabcd76e65b69dc3e/;jsessionid=0e618c8e793aabcd76e65b69dc3e",autoConnect:true,transport:"websocket",fallbackTransport:"long-polling",onMessage:WDA.pushCallbackFunction,onError:function(response){WDA.pushErrorFunction}});});</script><span id="j_idt9:txt_value" style="display:none;">txt</span><script id="j_idt9:j_idt11_s" type="text/javascript">$(function(){PrimeFaces.cw("Poll","pollConnection",{id:"j_idt9:j_idt11",widgetVar:"pollConnection",frequency:22,autoStart:true,fn:function(){PrimeFaces.ab({s:'j_idt9:j_idt11',f:'j_idt9',u:'j_idt9:txt_value',ps:true,oner:function(xhr,status,error){pollConnection.stop(); alert('Closed Session'); location.reload();G_reload_page=true;G_disconnected=true;;}});}});});</script><input type="hidden" name="javax.faces.ViewState" id="j_id1:javax.faces.ViewState:0" value="8162960213548174238:-3623140348150622308" autocomplete="off" />
Same with cookies, equal when works and when fails.
I you could guide something more specific to look for, I will glad to do so.