title: Spring MVC Server-Side Message Listener, Client Side update with WebSockets
body: <p>I am quite new with Spring MVC and Web technologies.</p>
  
  <p>I need "real time" interactions between the server side and the client side of my web application.
  When a user click on a button, I want to execute server side code, create a message and send it to every client.</p>
  
  <p>I think Web Sockets are the solution. I can add methods on the controller part of my application.
  When a user click on a button, the Controller method is called. I can execute code and send back a message for every clients.</p>
  
  <p>But now, I can receive messages coming from another website. Let's say that I am using a MessageListener.</p>
  
  <p>How am I supposed to notify my clients? The server side of WebSockets is in the controller. I don't think i am supposed to call this method from the server.</p>
  
  <p>I can create some kind of weird adapter capable to
   - Establish WebSocket channel with server (a local channel)
   - Receive messages from another website using a broker
   - Send the message to the controller</p>
  
  <p>I don't feel like this is an unusual need and my solution looks tricky.
  I am sure there is an easier way to do it, but I am not able to find it.</p>
  
  <p>So, am I doing it right? Do you have any idea, any suggestion?</p>
  
  <p>Thank you for your help.</p>
  
  <p>Ben</p>