dev@grizzly.java.net

Re: Problem with WebSockets using Grizzly in latest Glassfish 3.1 and Chromium

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Thu, 17 Jun 2010 11:35:24 +0200

Hi Ido,

sure, please file an issue.

Thanks.

WBR,
Alexey.

On Jun 17, 2010, at 11:33 , Ido Ran wrote:

> Hi,
>
> I've manage to get the sample chat application (http://www.antwerkz.com/glassfish-web-sockets-sample/
> ) to work with Glassfish 3.1 (10-jun nightly build).
> The problem is that the WebSocket implementation in Grizzly fail (or
> it take too long) to detect that a WebSocket has been abandoned by
> the client.
>
> The isConnected property of the WebSocket class do return false for
> disconnected sockets, but the application onClose method never get
> called.
>
> It is possible that I'm miss-understood who to work with Grizzly
> WebSocket but in the sample application the socket get piled in the
> "sockets" list. Also the send method of WebSocket get stuck if it is
> called on a closed socket which cause the broadcast method to be
> very weak and vulnerable to network problems.
>
> Also BaseWebSocket connected and state members are not set
> correctly, the connected is never set to true and state is always
> STARTING.
>
> Should I file those in ticketing system or they are known because
> this is still a work in progress?
>
> Thank you,
> Ido
>
>
>
> On Thu, Jun 17, 2010 at 9:51 AM, Ido Ran <ido.ran_at_gmail.com> wrote:
> Can someone please write here the branch name that contain the
> latest code of WebSocket - the code that actually ships with the
> nightly builds of Glassfish 3.1.
>
> Thanks,
> Ido
>
>
> On Tue, Jun 15, 2010 at 5:37 PM, Tako Schotanus <quintesse_at_palacio-cristal.com
> > wrote:
> Ok, thanks for the heads up.
>
> Could you maybe give a reference to the issue so I can track its
> status without having to bother the list?
>
> Cheers,
> -Tako
>
>
>
> On Tue, Jun 15, 2010 at 16:26, Justin Lee <justin.d.lee_at_oracle.com>
> wrote:
> I'm working that now. So far the samples still work for me and I've
> tried several browsers on 2 different OSes. There *are* issues but
> they don't prevent the samples from working in general. I haven't
> seen the new spec rev in the wild yet so there shouldn't be any
> browser issues just yet. I'm working on cleaning up those other
> issues, though.
>
>
> On 6/15/10 10:12 AM, Tako Schotanus wrote:
> Hi,
>
> any news on the status of this issue?
> I tried finding the issue in the bug database but without success.
>
> Cheers,
> -Tako
>
>
> On Tue, Jun 8, 2010 at 01:43, Justin Lee<justin.d.lee_at_oracle.com>
> wrote:
>
>
> I saw that blog a few days ago and was wondering about that. I didn't
> expect chrome to update so quickly. I'll file an issue against
> grizzly,
> though, so I can get it on my docket to fix.
>
>
> On 6/7/10 6:44 PM, Tako Schotanus wrote:
>
>
> Aha, I just found this on the chromium blog:
>
> http://blog.chromium.org/2010/06/websocket-protocol-updated.html
>
> Could possibly be related because I just found out that the things
> that
> worked before (those that I mentioned before) have all suddenly
> stopped
> working as well. Probably a browser update snuck me by without
> noticing.
>
> -Tako
>
>
> On Mon, Jun 7, 2010 at 22:28, Tako Schotanus<tako_at_codejive.org>
> wrote:
>
>
>
>
> Hi,
>
> I mentioned this already on Justin Lee's blog (
> http://www.antwerkz.com/glassfish-web-sockets-sample) but I haven't
> been
> able to get the websocket chat sample to work with the latest
> Glassfish
> 3.1
> (downloaded June 2nd).
>
> First I tried to just re-create the needed files from the
> information on
> his blog and when that didn't work out I just downloaded the latest
> grizzly
> and built the entire thing copying the websocket chat sample WAR to
> the
> Glassfish autodeploy folder. Although much better looking than the
> version I
> threw together the result stayed the same. A strange error from
> Chromium
> about needing a helper application (see attached image).
>
> It's not a problem with Chromium as far as I can see because many of
> the
> sample on the net function without any problem, as well as samples
> that I
> have running locally using jWebsocket and Jetty.
>
> Cheers,
> -Tako
>
> PS: Just curious, but the Websocket implementation that Jetty uses (a
> WebSocket is a subclass of HttpServlet) seems conceptually a bit
> simpler
> than the way it's done in Glassfish (using both a WebSocket and a
> WebSocketApplication). Any particular reason as to why?
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>
>
>
>
>
>
>