a4j:push and timeout attribute
digitalseraphim Aug 5, 2008 7:17 PMI'm not sure this is in the right place, but here'goes anyway...
According to the Richfaces devguide:
The example shows how date is updated on a page in compliance with data taken from a server. In the example "interval" attribute has value "2000". This attribute defines an interval in milliseconds between the previous response and the next request. Default value is set to "1000" milliseconds (1 second). It's possible to set value equal to "0". In this case connection is permanent.
The "timeout" attribute defines response waiting time in milliseconds. If a response isn't received during this period a connection is aborted and the next request is sent. Default value for "timeout" attribute isn't set. Usage of "interval" and "timeout" attributes gives an opportunity to set short polls of queue state or long connections, or permanent connection.
This leads me to believe that it is possible to do "long polling" with this component by setting the timeout high, and the interval low. when doing this, with no events occurring, i would expect the following (timeout=60000, interval=1000 for discussion's sake, times approximate):
time 0: connection opened time 60000: empty response (no events), connection closed time 61000: connection opened time 121000: empty response (no events), connection closed time 122000: connection opened time 182000: empty response (no events), connection closed
and so on. what I actually end up seeing is:
time 0: connection opened time 58: empty response (no events), connection closed time 1058: connection opened time 1107: empty response (no events), connection closed time 2107: connection opened time 2153: empty response (no events), connection closed
and so on, where the connection time is very short, but the interval is correct. Looking at the code (BaseFilter.java in 3.2.1GA) there is no support for the timeout value at all, and all push requests are responded to immediately. Am I misunderstanding something, is there a bug, or is the documentation wrong? I'm hoping its a bug, because the documented functionality is exactly what I'm looking for.
Thanks for your time,
DS