users@glassfish.java.net

Re: servlet 3.0 async, gfv3

From: Gregory Gerard <ggerard_at_mac.com>
Date: Wed, 14 Apr 2010 11:17:52 -0700

Are you running something that's touching the class file for your Servlet and causing the container to reload it by any case?

greg

On Apr 14, 2010, at 11:15, emiddio-verizon wrote:

> thanks for the servlet; i will study and use it.
>
> my servlet's init() is being called for each browser request -- i guess i will file a bug; also seen with
> gfv3 sample async-request-war when debug stepping thru the code.
>
> your why not question --
>
> servlet1 dispatches with
> AsyncContext ac = request.startAsync();
> ...
> ac.dispatch("servlet2");
>
> servlet2 tries to get AsyncContext via
> request.getAsyncContext(); -- get exception because
> request.isAsyncStarted() is false;
>
> if unable to get the AsyncContext cannot call ac.complete();
>
> gary
>
> Yes, only one init per Servlet, regardless of whether the Servlet is declared to support async operations. Shing Wai has confirmed in an earlier email that this is the case.
>>
>>
>> i have not figured how i am suppose to use AsycnContext.complete(); if i async.dispach to another servlet -- that servlet cannot
>> call AsyncContext.complete();
>
> Why not?
>