On Nov 26, 2008, at 2:07 PM, Jeanfrancois Arcand wrote:
>
>
> 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 :-)
hahaha.. go for it and let me know if you see places that could be
improved. I'm sure that there are some. Especially the plugin
interface is super simple and should be improved.
One thing I'm not terribly happy about is the state of my test suite.
I basically have only a faban benchmark which does system/acceptance
testing and load testing/benchmarking. I have some unit and functional
tests written in RSpec that I invoke via JTestR, but that stuff is not
committed yet because it's not complete.
In general I found it pretty difficult to test the code that extends
grizzly code. Maybe that has changed in later releases (I've been
primarily working with 1.0.x), but I'd really love to see some helper/
mock/stub classes in grizzly or more IoC/injection that would aid in
building a good test suite.
Do you have any pointers to your test suite or testing practices that
other grizzly developers could leverage?
/i
>
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>