users@grizzly.java.net

Re: onmessage not invoked when using grizzly-websockets

From: Tako Schotanus <quintesse_at_palacio-cristal.com>
Date: Wed, 18 May 2011 21:11:09 +0200

Hi,

maybe a stupid suggestion, but did you enable websocket support in the
server?

(See
http://weblogs.java.net/blog/spericas/archive/2010/09/29/web-sockets-and-html5-glassfish#comment-177268
)

-Tako


On Wed, May 18, 2011 at 20:32, pford68 <pford68_at_earthlink.net> wrote:

> Hello, I'm seeing some strange behavior when using grizzly-websockets, both
> in 2.1 and in 1.9.x, in Glassfish 3.1. (I should add that I am new to
> using
> web sockets.) When I call send() on the client side, the onmessage()
> method
> on the server side is not invoked. I see this same behavior in an example
> app for version 1.9.x at (VideoSharing at
>
> http://weblogs.java.net/blog/spericas/archive/2010/09/29/web-sockets-and-html5-glassfish
> ).
> If I put a breakpoint, for example, at the beginning of onmessage() in the
> WebSocketapplication subclass, the breakpoint is never hit. Curiously at
> this points, I seem to be able to exchange data between browsers despite
> apparently not entering any code in my WebSocketapplication subclass.
>
> Furthermore, I frequently see that createSocket(), in the
> WebSocketApplication, in not invoked when a new WebSocket is created on the
> client side. I did register the app within a servlet, and the client-side
> WebSockets point to that servlet URL, with a "ws" protocol.
>
> Can anyone shed any light on how to invoke the server-side code?
>
>
> --
> View this message in context:
> http://grizzly.1045725.n5.nabble.com/onmessage-not-invoked-when-using-grizzly-websockets-tp4407330p4407330.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.
>