7 Replies Latest reply on Aug 22, 2013 7:29 AM by Erik Jan de Wit

    HELP : Errai CDI Decoupled for Mobile Clients

    Charles Odili Apprentice

      I need guidance on how to approach a design issue for my app. Its a GWT mobile app (Touch4j), and is supposed to have a chat tool that will allow 2 or more mobile users to communicate.


      The issue / question is, how can the mobile app be decoupled from the CDI-powered chat relay server, such that the relay server-app can be deployed online (say openshift) and will recieve / broadcast messages coming from the mobile client which will run entirely on the mobile device.


      Since the mobile app is a HTML5-based app (Touch4j), and limited with browser's same origin policy, I don't know if we may have to rely on REST-based CDI (JAX-RS).


      What I think we need (please advice and correct)

      1. GWT project for chat relay service. define jax-rs interfaces in shared package and implement them in server package to push meaages with CDI Events

      2  Use the classes from shared package above with Errai's Caller<T> factory to post chat messages and then consume responses with @Obseves methods


      Can someone do a CDI Events sample with javx-rs ?