users@grizzly.java.net

Re: Help with slow file uploads

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 01 May 2009 15:41:27 -0400

Salut,

Thomas Gideon wrote:
> 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.

Can you send me you war file privately (jfarcand_at_apache.org) so I can at
least see why you aren't getting comet enabled?

Thanks!

-- Jeanfrancois


>
>
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>