0 Replies Latest reply on Sep 26, 2012 4:16 PM by altayeb saadeh

    Broadcast message from server to client

    altayeb saadeh Newbie

      i am trying to broadcast message from the server to the client.

      the environment GWT2.4 and Spring framework,JPA.


      client code:


      ErraiBus.get().subscribe("MessageListener", new MessageCallback() {


            public void callback(Message message) {

                String count = message.get(String.class, "Text");





      from the server i got the erraiService from jetty-env.xml JNDI:


      <New id="Errai" class="org.mortbay.jetty.plus.naming.Resource">

              <Arg><Ref id="sample-weld"/></Arg>



                  <New class="javax.naming.Reference">








      ErraiService erraiService = (ErraiService) new InitialContext().lookup("java:comp/env/ErraiService");

      MessageBuilder.createMessage().toSubject("MessageListener").with("Text", "hello, errai").noErrorHandling().sendGlobalWith(bus);


      from the console i can see the messagebuilder send the message, but the client did not receive this message, any suggestion.