users@grizzly.java.net

Re: grizzly-sendfile (was Re: High latency of ARP calls in Glassfish v2)

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 26 Nov 2008 17:07:33 -0500

Igor Minar wrote:
>

[cut]

>
> I believe I have copy of the comet code from gfv2ur2 and in CometTask I
> see:
>
> } finally {
> // Bug 6403933
> if (connectionClosed){
> cometSelector.cancelKey(cometKey);
> }
>
> And in CometSelector there is:
>
> SelectorThread st = cometTask.getSelectorThread();
> SelectionKey mainKey = cometTask.getSelectionKey();
> if (cometTask.getCometContext() != null){
> cometTask.getCometContext().interrupt(mainKey);
> }
> cometEngine.interrupt(key);
> st.cancelKey(mainKey);
>

ah you deep dive inside that code :-) I agree I think that will works.
But I still need to invoke cancelKey(..) as the keep-alive subsystem
needs to be advised a connection is getting closed. I guess I can get
the KeepAlivePipeline and invoke it directly. I need to investigate...

Let me look at your code now :-)

A+

--Jeanfrancois



> /i
>
>
>>
>>
>>
>> This would allow me to
>>> avoid having to retain a reference to the main selector and its
>>> selectionkey resulting in less clutter.
>>
>> I agree.
>>
>> A+
>>
>> -- Jeanfrancois
>>
>>
>>> /i
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>