users@grizzly.java.net

Re: multiple tabs and onInterrupt behaviour

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Fri, 22 Jul 2011 12:06:47 +0200

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

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