users@grizzly.java.net

Re: multiple tabs and onInterrupt behaviour

From: Eric Luong <eluong_at_ualberta.ca>
Date: Mon, 25 Jul 2011 16:09:47 -0600

Hi Alexey,

Sorry for the silence - I was not quite sure how these things should be
packaged in a test case as I found that I wasn't able to get any consistent
errors. I've found the problem, however. I noticed in netstat that all the
TCP connections to my server had the same PID even though they were from
different browsers. I discovered that the PID belonged not to any of the
browsers but to my antivirus program. After disabling the antivirus, all
the interrupts are coming through right away, as expected.

Thanks for the help!

Eric

On Fri, Jul 22, 2011 at 4:06 AM, Oleksiy Stashok <oleksiy.stashok_at_oracle.com
> wrote:

> Hi Eric,
>
>
> On the Interrupt question, I used netstat on my Windows box as you
>> suggested and found that connections did seem to remain after closing
>> the tab. Nonetheless, I expected that given time the connection would
>> be severed and thus, eventually, the Interrupt would occur. From
>> netstat I found that, yes, eventually the connection was dropped on the
>> client side. However, the interrupt never came.
>>
> Can you pls. create the testcase for us, so we can reproduce this locally?
>
>
> I'm also still wondering why, on the Linux box, closing the connection
>> would sometimes result in two Interrupts called instead of one.
>>
> That's not normal as well, testcase? :)
>
>
> On the first issue, when you say "new message" in Gmail, do you mean a
>> new email, or the chat function?
>>
> email.
>
>
> I tried testing both. With the chat,
>> I found that I received new messages in all browsers and tabs. With
>> emails it was far less consistent. Sometimes all browsers and tabs
>> would be updated, and other times the updates would only reach some
>> tabs. For one string of tests, I found just one tab in Firefox was
>> getting all the updates whereas the other tab got none. But again,
>> this was not consistent, whereas with my test application in Glassfish,
>> it was extremely consistent in alternating between open tabs. With 3
>> or more, it would cycle through them one after another, in consistent
>> order too.
>>
> This might be related
> http://stackoverflow.com/**questions/985431/max-parallel-**
> http-connections-in-a-browser<http://stackoverflow.com/questions/985431/max-parallel-http-connections-in-a-browser>
>
> Again, it would be good if you can provide some code we can check locally.
>
> Thanks.
>
> WBR,
> Alexey.
>
>
> Possibly part of it was that it took my test emails some time to arrive
>> (in the tens of seconds), which I was watching in a different browser
>> where I was actively refreshing. I suppose Gmail is also using a lot
>> more different strategies with various fallbacks and such, while my own
>> test app is simple and straightforward.
>>
>> Once again, thank-you for your insight. :)
>>
>> Cheers,
>>
>> Eric
>>
>
>