
|
If you were logged in you would be able to see more operations.
|
|
|
| Severity: |
Major
|
| Fixed in Change#: |
6,855
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
This used to work in 3.4, now the ontimeout callback doesn't seem to get fired.
In swf, a warning is printed after 30 seconds and 60 seconds
WARNING: idle.returnData: <br><b>sleeping for 25 seconds...</b></br><br><b>done</b></br> already loaded
WARNING: idle.returnData: <br><b>sleeping for 25 seconds...</b></br><br><b>done</b></br> already loaded
as if the timeout handler is running, noticing that the loader has already gotten to a completed state, but not sending the appropriate event,
the 30 second default timeout is being used, so the user-specified 2 second timeout seems to be being ignored
test case:
<canvas width="100%" height="100%" debug="true">
<dataset name="mydata"
request="false"
type="http"
timeout="2000"
src="sleep.jsp?s=25"
ondata="Debug.write('load complete', this.serialize())"
ontimeout="canvas.timeout(this.name, this.timeout)"
/>
<button onclick="canvas.go()">load dataset with 2 seconds timeout</button>
<method name="go">
this.stime = getTimer();
mydata.doRequest();
</method>
<method name="timeout" args="caller, timeoutValue">
Debug.write(caller + ' timed out with a timeout value of ' + timeoutValue + '.');
Debug.write('delay was '+ (getTimer() - stime));
</method>
</canvas>
sleep.jsp:
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<%@ page import="java.util.*,
org.jdom.output.*"%>
<%
int sec = 8;
String s = request.getParameter("s");
if (s != null) {
sec = Integer.parseInt(s);
}
int msec = sec * 1000;
out.println("<br><b>sleeping for " + sec + " seconds...</b></br>");
out.flush();
try {
Thread.sleep(msec);
} catch (Exception e) {
out.println("<br><i>Caught exception</i></br>");
out.flush();
}
out.println("<br><b>done</b></br>");
out.flush();
%>
|
|
Description
|
This used to work in 3.4, now the ontimeout callback doesn't seem to get fired.
In swf, a warning is printed after 30 seconds and 60 seconds
WARNING: idle.returnData: <br><b>sleeping for 25 seconds...</b></br><br><b>done</b></br> already loaded
WARNING: idle.returnData: <br><b>sleeping for 25 seconds...</b></br><br><b>done</b></br> already loaded
as if the timeout handler is running, noticing that the loader has already gotten to a completed state, but not sending the appropriate event,
the 30 second default timeout is being used, so the user-specified 2 second timeout seems to be being ignored
test case:
<canvas width="100%" height="100%" debug="true">
<dataset name="mydata"
request="false"
type="http"
timeout="2000"
src="sleep.jsp?s=25"
ondata="Debug.write('load complete', this.serialize())"
ontimeout="canvas.timeout(this.name, this.timeout)"
/>
<button onclick="canvas.go()">load dataset with 2 seconds timeout</button>
<method name="go">
this.stime = getTimer();
mydata.doRequest();
</method>
<method name="timeout" args="caller, timeoutValue">
Debug.write(caller + ' timed out with a timeout value of ' + timeoutValue + '.');
Debug.write('delay was '+ (getTimer() - stime));
</method>
</canvas>
sleep.jsp:
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<%@ page import="java.util.*,
org.jdom.output.*"%>
<%
int sec = 8;
String s = request.getParameter("s");
if (s != null) {
sec = Integer.parseInt(s);
}
int msec = sec * 1000;
out.println("<br><b>sleeping for " + sec + " seconds...</b></br>");
out.flush();
try {
Thread.sleep(msec);
} catch (Exception e) {
out.println("<br><i>Caught exception</i></br>");
out.flush();
}
out.println("<br><b>done</b></br>");
out.flush();
%>
|
Show » |
|
Changed paths:
M /openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzHTTPLoader.js
M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzHTTPLoader.as
M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
M /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
Change 20071015-hqm-2 by hqm@IBM-2E06404CB67 on 2007-10-15 16:39:47 EDT
in /cygdrive/c/users/hqm/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix dataset timeout event callback
New Features:
Bugs Fixed:
LPP-4881Technical Reviewer: andre
QA Reviewer: pkang
Doc Reviewer:
Documentation:
Release Notes:
Details:
The code in LzHttpDataProvider which dispatched on the datarequest
status type was
always calling loadResponse, which always set the requests status to
error if data was null.
Modified the code in LzHttpDataProcider.loadTimeout to just directly
call the onstatus event
iinstead of calling loadResponse.
DHTML timeout checking code rewritten by andre to be more efficient
Tests:
test/lfc/data/alldata.lzx
amazon app
calendar app
smokecheck