java - Tyrus server endpoint @OnMessage method not triggered -
i attempting run simple websocket example using tyrus 1.8.3 , javax.websocket api, following https://blog.openshift.com/how-to-build-java-websocket-applications-using-the-jsr-356-api/ guide.
using annotations, have created simple server endpoint , client endpoint triggers method annotated with@onopen correctly. however, when send message client, method @onmessage not triggered on server side.
interestingly, session id created @ onopen differs between client , server. don't understand why , think may problem? should session ids not same - there 1 session...
i have written simple javascript client connect same server endpoint , not trigger @onmessage method, suspecting there issue on server side.
i have raised log level fine nothing reported @ info level. logs looks websocket upgrade successful , connection opened ok. javax.naming.noinitialcontextexception
thrown on both client , server i'm not sure if relevant...
i have uploaded of code github here: https://github.com/stephenhartley/websocket-demo
logs files can viewed in logs folder.
could give me guidance how trace cause of issue?
many thanks!
Comments
Post a Comment