title: Attach an @Observer method to a Java WebSocket ServerEndpoint?
body: <p>This seemed like such a trivial idea but... I want my Java EE7 WebSocket endpoint to have a method for observing events so that I can send messages back to the browser client when the event fires. It makes sense to put the event on the WebSocket because that's where you can cache the Session when it opens the WebSocket, and use it to send a message back to the right client.</p>
  
  <p>But... If I use a simple @Observes method on the WebSocket, when the event fires it creates a <em>new</em> WebSocket instance which does not have the Session cached. Alternately, when I use @Observes(notifyObserver=IF_EXISTS) to try and block the creation of a new WebSocket instance, it doesn't fire at all.</p>
  
  <p>Help? Is it not possible to use a WebSocket endpoint as an event observer? Or is there a better way to route messages back to the client who opened the socket in the first place?</p>