Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 3.1.2.Final
    • Fix Version/s: 3.1.2.Final
    • Component/s: ErraiBus
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      client side :
      ErraiBus.get().subscribe("test", new MessageCallback() {

      @Override
      public void callback(Message message)

      { String messageText = message.get(String.class, "text"); Window.alert(messageText); }

      });

      server side :

      package com.inovelan.cloud.portailps.server;

      import org.apache.log4j.Logger;
      import org.jboss.errai.bus.client.api.base.MessageBuilder;
      import org.jboss.errai.bus.client.api.messaging.Message;
      import org.jboss.errai.bus.client.api.messaging.MessageCallback;
      import org.jboss.errai.bus.client.api.messaging.RequestDispatcher;
      import org.jboss.errai.bus.server.annotations.Service;
      import org.jboss.errai.common.client.api.ErrorCallback;

      import java.io.IOException;

      import javax.inject.Inject;
      import javax.servlet.ServletException;
      import javax.servlet.annotation.WebServlet;
      import javax.servlet.http.HttpServlet;
      import javax.servlet.http.HttpServletRequest;
      import javax.servlet.http.HttpServletResponse;

      @Service
      @WebServlet("/MyEchoService")
      public class MyEchoService extends HttpServlet implements MessageCallback {

      private final static Logger LOGGER = Logger.getLogger(MyEchoService.class);

      private RequestDispatcher dispatcher;

      @Inject
      public MyEchoService(RequestDispatcher dispatcher)

      { this.dispatcher = dispatcher; }

      @Override
      public void callback(Message message)

      { test(); }

      public void test() {
      LOGGER.info("sending a test message to clients with dispatcher : " + dispatcher);
      MessageBuilder.createMessage().toSubject("test").signalling().with("text", "Hi There").errorsHandledBy(new ErrorCallback() {

      @Override
      public boolean error(Object message, Throwable throwable) { LOGGER.error(throwable); return true; }
      }).sendGlobalWith(dispatcher);
      }

      @Override
      protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { test(); }

      }

      Show
      client side : ErraiBus.get().subscribe("test", new MessageCallback() { @Override public void callback(Message message) { String messageText = message.get(String.class, "text"); Window.alert(messageText); } }); server side : package com.inovelan.cloud.portailps.server; import org.apache.log4j.Logger; import org.jboss.errai.bus.client.api.base.MessageBuilder; import org.jboss.errai.bus.client.api.messaging.Message; import org.jboss.errai.bus.client.api.messaging.MessageCallback; import org.jboss.errai.bus.client.api.messaging.RequestDispatcher; import org.jboss.errai.bus.server.annotations.Service; import org.jboss.errai.common.client.api.ErrorCallback; import java.io.IOException; import javax.inject.Inject; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @Service @WebServlet("/MyEchoService") public class MyEchoService extends HttpServlet implements MessageCallback { private final static Logger LOGGER = Logger.getLogger(MyEchoService.class); private RequestDispatcher dispatcher; @Inject public MyEchoService(RequestDispatcher dispatcher) { this.dispatcher = dispatcher; } @Override public void callback(Message message) { test(); } public void test() { LOGGER.info("sending a test message to clients with dispatcher : " + dispatcher); MessageBuilder.createMessage().toSubject("test").signalling().with("text", "Hi There").errorsHandledBy(new ErrorCallback() { @Override public boolean error(Object message, Throwable throwable) { LOGGER.error(throwable); return true; } }).sendGlobalWith(dispatcher); } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { test(); } }

      Description

      Hi, sending a message to all clients via the request dispatcher doesn't work using wildfly >=8.2.

      here the following error server-side :
      INFO [MyEchoService] sending a test message to clients with dispatcher : org.jboss.errai.bus.server.service.RequestDispatcherProxy@1ecf956f
      ERROR [MyEchoService] org.jboss.errai.bus.client.api.base.NoSubscribersToDeliverTo: no subscribers to deliver to for subject: test

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                csa Christian Sadilek
                Reporter:
                jimmy.pannier Jimmy Pannier
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: