Sierk Schmittner wrote:
Hi,

I want to implement a server push mechanismus with Tomcat 6/Comet.

The use case is that a javascript client sends an AJAX request to the
server. The server is performing some internal asynchronous tasks (in
seperate threads). The result of these tasks should be pushed asynchronous
to the client over the existing connection.

I am using a Comet-based servlet and I'm facing two problems:
- When I write the data to the response's outputstream and call the flush
method, the data is only send to the client when there is a minimum amount
of bytes written on the outputstream. Is it possible to change this behavior
so that the data is send immediately?
response.flushBuffer() ?

- When the last task ist finished, its result should be send back to the
client and the connection should be closed. Is it possible to terminate the
connection on the server side? Or how can I trigger the Comet-End-Event?
there is a fix in tomcat/trunk SVN to allow async CometEvent.close event
waiting for the next 6.0.x release before I propose the backport
Thanks.

Best regards,

  Sierk

------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG. Version: 7.5.524 / Virus Database: 269.24.2/1471 - Release Date: 5/28/2008 5:33 PM


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to