Mark Sires wrote:
> I seem to remember some discussion ...
On this newsgroup?

> that the timeout for the hyperevents was hardcoded in the Java broker
> applet.
It's possible, but I'm skeptical - unless it was already removed.
java.net.URLConnection has no timeout provision that I know of.
If you know the timeout, it should not be hard to test.

I ran this little test <http://127.0.0.1:1972/csp/user/TimeOutTest.csp> 
shown below and it worked up to 15 minutes that I tried.
So if there is a client-side time out, it is greater than 900 seconds.


<!-- Warning: running this CSP could consume all available license units. -->
<html lang="en">
<head><title>time out test</title> 
<script type="text/javascript">
RESULT=""
THREADS=0

function w(text) {
        RESULT+=text
        document.getElementById("result").innerHTML="<pre>\n"+RESULT+"\n</pre>"
}

function starttest(minutes) {
        var obj=cspFindBroker()
        if(obj==null){alert("Couldn't find CSPbroker applet!"); return}
        for(var 
minutes=0;minutes<16;minutes+=5){setTimeout('testinterval('+minutes+')',500*minutes);THREADS++}
        w("\n")
        return
}
function testinterval(minutes) {
        w((minutes<10?" ":"")+minutes+" minutes = 
"+#server(..serverHang(String(minutes)))#+"\n")
        if((--THREADS)==0)w("\n\nTest completed "+#server(..serverTime())#+"\n")
}

function onload(){
        if(confirm('Start test now?')){
                w('Testing for server time out '+#server(..serverTime())#+'...\n\n')
                setTimeout('starttest(0)',50)
        }
}
</script>

</head>
<body onload="onload()">
<p>
http://127.0.0.1:1972/csp/user/TimeOutTest.csp
</p>
<span id="result">Test has not started.
</span>
</body>
</html>

<script language="Cache" runat="server"
 method="serverHang"
 arguments="minutes:%String"
 returntype="%String">
        s seconds=minutes*60
        h seconds
        q $j(seconds,4)_" seconds.  "_$zdt($h,3,1)
</script>
<script language="Cache" runat="server"
 method="serverTime"
 arguments=""
 returntype="%String">
        q $zdt($h,3,1)
</script>



My results:

http://127.0.0.1:1972/csp/user/TimeOutTest.csp 

Testing for server time out 2004-08-10 20:56:38...


 0 minutes =    0 seconds.  2004-08-10 20:56:38
 5 minutes =  300 seconds.  2004-08-10 21:01:40
10 minutes =  600 seconds.  2004-08-10 21:11:40
15 minutes =  900 seconds.  2004-08-10 21:26:41


Test completed 2004-08-10 21:26:41


As you can see, even though the threads were launched in parallel, 
they were serialized on the server.

Reply via email to