6 Replies Latest reply on Jul 12, 2013 7:33 AM by Erik Jan de Wit

    CDI: bus reconnects after server crash, but no subscriptions

    Michael Jank Newbie

      Hello!

       

      I am using Errai 2.3.2.Final on tomcat 7 with CDI, SimpleDispatcher and StandardAsyncServlet. Messaging client-server and server-client is working fine.

      After a server crash the message bus is going back to online again as soon as the server restarts, but it is not possible to send messages from the client to the server or vice-versa anymore.

      Meaning, a full recovery after a connection loss is not possible.

       

      Is this expected to be working with CDI?

       

      As the bus is going back online, I see the post messages

      ConnectToQueue, RemoteSubscribe of ClientBus and ClientBusErrors, FinishStateSync (all of them to ServerBus) and AttachRemote to cdi.event:Dispatcher.

      But I dont see the post messages RemoteSubscribe to cdi.event:Dispatcher for my communication messages, as I do see them at initial page load.

      This seems to be the reason why the messaging is not working any more - the effect is both valid for websockets and long polling.

       

      I already tried to do a bus.init() on busOffline message of the BusLifecycleListener or on a transport error message, but without success.

       

      Cheers,

      Michael