users@grizzly.java.net

Re: Grizzly Comet onTerminate()

From: felixx <dolaru_at_sympatico.ca>
Date: Mon, 30 Mar 2009 14:39:14 -0700 (PDT)

Hi, thanks.
My assumption was based on CometHandler's javadoc saying:
"void onTerminate(CometEvent event) ... Receive CometEvent notification when
the response is resumed by a CometHandler or by the CometContext.."
I checked the code but couldn't figure out where this may happen.
It looks like a clean way (together with onInterrupt()) to send any closing
tags to the client or do some cleaning.



Jeanfrancois Arcand-2 wrote:
>
> Salut,
>
> felixx wrote:
>> I'm under the impression that onTerminate() is automatically called when
>> the
>> handler is resumed, is this correct?
>
> No by default it is not called. The only time it is called is when you
> invoke CometEngine.unregister(). Now I'm having a doubt that we may have
> supported the onTerminate invocation before. Did you read the fact
> somewhere?
>
>
>> I have a handler (extends DefaultConcurent handler, GF V#, Grizzly 1.9.8)
>> and in onEvent() I do context.resumeCometHandler() which returns 'true'
>> but
>> the onTerminate() is never called.
>> The rest of the callbacks are called as expected.
>
> I'm tempted to think this is an issue. Let me dig into the code as I
> suspect I may have supported the scenario. If not, I think we should
> support it. Gustav, what do you think?
>
> A+
>
> --Jeanfrancois
>
>
>> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/Grizzly-Comet-onTerminate%28%29-tp22793164p22793517.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.