Rémy Maucherat wrote:
On 5/2/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
What you seem to want is more in line with the "asynchronous servlet"
(request, wait, response), which Filip and Remy pointed out is not the
quite the same as Tomcat's Comet. Ideally, both models would be possible
through  single unified API, but this is currently not yet the case.

You're misrepresenting certain things. As you can see, it is already
possible to do request, wait, response,

Sorry about that, did not mean to say it is not possible to do a request, wait, response with Comet. All I'm trying to say is that Comet was not designed (at least, Filip stated this) for the async servlet model, and I tried to point out some of the issues when using Comet in such a scenario, such as getParameter() not working, synchronization issues, etc.. There is a difference between "possible", and "easy/practical". What I meant was that the current API is not designed for both models, and it is not yet so practical for the async servlet model.

but you'll have to wait for an IO event to free up the memory used by the request processor.

You need the IO event to free up more than just the memory. The file descriptor also needs to be freed; this was causing problems for me earlier.

It would seem easy to me to cause the client to disconnect after the request, as keepalive is probably not extremely useful in this scenario, producing the event.

With a combination of "Content-Length" or chunked encoding plus a "Connection: close" header this should be possible, I agree. I would still like to know the "official" way to synchronize this is, though.

I've seen it happen that my application was still in the "write()" method of the reponse output stream when I already received the END event in my CometProcessor. At the moment I'm synchronizing event.close() and all access to the response output stream with the same lock, but I do not know for sure if this is the correct approach. I would very much like to know what the "official" approach is.

Rémy

Regards,
Sebastiaan


---------------------------------------------------------------------
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