tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bezel <>
Subject Comet question about ending the event
Date Sat, 07 Apr 2007 01:21:35 GMT


Here is the situation I have a question about:

1. There is a servlet that implements CometProcessor interface.
2. Like a known chat example this servlet's event method put response
objects into a static array
3. There is another thread that listens for new messages and once they
arrive - it gets correct response object from the static array and write an

The question is - how do I "commit" the response right after step #3. I
don't want to wait for an event timeout to get the response done in the
browser. writer.flush() does not really ends the browser requests... 

I've tried to to do "event.close()" (by having a hashmap of events with
response refferences) objects right in the end of step #3 and it seems to be
ok, but I'm not sure if it's a right way.
Any suggestions here?
View this message in context:
Sent from the Tomcat - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message