users@grizzly.java.net

Re: Help with slow file uploads

From: Thomas Gideon <tgideon_at_learningobjects.com>
Date: Fri, 1 May 2009 15:23:01 -0400

On Mon, Apr 27, 2009 at 5:09 PM, Jeanfrancois Arcand
<Jeanfrancois.Arcand_at_sun.com> wrote:
>
> http://weblogs.java.net/blog/jfarcand/archive/2006/07/the_grizzly_com.html
>
> Yes, the simplest solution would consist of:
>
> (1) Request for upload comes
> (2) Suspend the response.
> (3) Use another ExecutorServices to grab the suspended request and do the
> read I/O operations.
> (4) Once finished, resume the response.
>
> That way you won't block the normal request-processing thread.
>
> Let me know what you think and I can try to spend time helping.

Jean-Francois,

I am trying to build code that follows the example but keeping getting
this exception from the line in doPost() that adds my handler:

java.lang.IllegalStateException: Make sure you have enabled Comet or
make sure the Thread invoking that method is the same a the request
Thread.

Again, I am runnnig GF 2.1. I had added the "cometSupport" property
to my http-listener with a value of "true". I have load-on-startup
set to 0 for my servlet and the CometEngine.register() call in int().

Is there something else I am missing? Is there someway I can share my
sources other than pasting them in an email? I have a small-ish Maven
project that I could zip up.


Thomas