You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by stang <sa...@gmail.com> on 2009/06/13 00:36:19 UTC

Comet error state always happen--why?

Hi there,

I'm trying to test out Tomcat's comet support by building a test application
to exploit this feature.  What I am doing is to let the connection continue
to stay open by not calling event.close() on neither a BEGIN/READ event. 
Despite setting the event.setTimeout(-1) on BEGIN event, eventually I
receive an ERROR state and this forces me to call event.close() which
effectively turns off comet.  The only way that I can prolong the inevitable
timeout is by having a background thread that runs every 5 seconds to write
something to the connection's response.  Do I have to do such a thing?  Can
I not enable an option to let the connection stay open indefinitely?  

Thanks in advance.

-- 
View this message in context: http://www.nabble.com/Comet-error-state-always-happen--why--tp24007062p24007062.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Comet error state always happen--why?

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
most likely your client is closing your connection due to inactivity, 
nothing you can do about it

you would do setTimeout(Long.MAX_VALUE) if you want a really long 
timeout, I'm not sure -1 is a valid value


Filip

stang wrote:
> Hi there,
>
> I'm trying to test out Tomcat's comet support by building a test application
> to exploit this feature.  What I am doing is to let the connection continue
> to stay open by not calling event.close() on neither a BEGIN/READ event. 
> Despite setting the event.setTimeout(-1) on BEGIN event, eventually I
> receive an ERROR state and this forces me to call event.close() which
> effectively turns off comet.  The only way that I can prolong the inevitable
> timeout is by having a background thread that runs every 5 seconds to write
> something to the connection's response.  Do I have to do such a thing?  Can
> I not enable an option to let the connection stay open indefinitely?  
>
> Thanks in advance.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org