For a WebSocket endpoint defined as:
@OnMessage(maxMessageSize=6)
public String echoText(String data) {
return data;
}
If a message of size of 7 bytes is sent, then the following exception is
thrown on the server-side:
SEVERE: org.glassfish.tyrus.core.MessageTooBigException: Message too
long; allowed message size is 6 bytes. (Current message length is 7 bytes).
at
org.glassfish.tyrus.core.SessionImpl.checkMessageSize(SessionImpl.java:377)
at
org.glassfish.tyrus.core.SessionImpl.notifyMessageHandlers(SessionImpl.java:398)
at
org.glassfish.tyrus.core.EndpointWrapper.onMessage(EndpointWrapper.java:490)
at
org.glassfish.tyrus.server.TyrusEndpoint.onMessage(TyrusEndpoint.java:174)
But onError is not invoked on the client-side.
Is that the expected behavior ?
Arun
--
http://twitter.com/arungupta
http://blogs.oracle.com/arungupta