Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Created February 10, 2015 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/13056476986853eb81b3 to your computer and use it in GitHub Desktop.
Save abhirockzz/13056476986853eb81b3 to your computer and use it in GitHub Desktop.
public void onMsg(@Observes String msg) {
//different WS enpoint instance - notice the hash code value in the server log
System.out.println("WS End point class ID -- " + this.hashCode());
try {
client.getBasicRemote().sendText(msg);
} catch (IOException ex) {
Logger.getLogger(ServerEndpoint.class.getName()).log(Level.SEVERE, null, ex);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment