it was a behaviour observed in the servlet -- is why its related --i bunched all my questions together.
i have also seen the behaviour in the gfv3 samples web app -- async-request-war project --
which fails to work properly -- it claims to be a modified grizzly sample -- but the grizzly sample
which uses comet does work; but this sample does not -- yesterday while debugging it -- i caught
its init() being called for each message being posted in the web app form. -- and each init
create a new thread for dealing with a new message queue -- but this is off topic.
the fact is init() is being called for each servlet invocation -- at least for async servlets.
i have not checked if happening for non-async servlets.
my interest was in the async perhaps more precisly in a posting to the servlet forum --
here copied/pasted
-------------------------
i am experimenting with servlet 3.0 async with gfv3; my servlet's init() method is being called for each browser web request -- i thought only 1 init() call per servlet ??
destroy is only being called when i undeploy the servlets -- 2 servlets in 1 web app.
i am trying to experiment with all the options that apply to async support.
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();
also --
the AsyncListener class -- has method onStartAsync() -- i am searching for a way to cause that method to be called ?
any help in understand will be appreciated.
-------------
thanks
gary
----- Original Message -----
From: Shing Wai Chan
To: users_at_glassfish.dev.java.net
Sent: Tuesday, April 13, 2010 6:25 PM
Subject: Re: servlet 3.0 async, gfv3
On 4/13/2010 6:03 PM, Shing Wai Chan wrote:
The servlet init() should only be called once for a given servlet.
I have confirmed that this is correct in GlassFish v3.
Btw, how is it related to async described in the email subject?
Shing Wai Chan
On 4/13/2010 5:37 PM, emiddio-verizon wrote:
i am experimenting with servlet 3.0 async with gfv3;
but i am confused -- i thought the servlet's init() method was only to be called 1 time -- at
servlet initialization ???
i am seeing init() being called for each browser web request.
destroy is only being called when i undeploy the servlet
this seems wrong to my understanding.
gary