1 Reply Latest reply on Aug 3, 2010 2:50 PM by Mike Brock

    RequestDispatcher injection

    duser dsuer Newbie

      Hello

       

      A quick question about the user guide ; how do we do to declare injection dependencies in Service classes, extension components and session providers?. I am running my GWT web apps on glassfish application server. When deploying the project I can see the RequestDispatcher reference (in my logs) and i would like to invoke its methods (MessageBuilder.createMessage().toSubject("HelloWorldClient") ... ) from an EJB. Is that actually possible ?

       

       

        • 1. Re: RequestDispatcher injection
          Mike Brock Master

          We don't currently have generic EJB integration of any kind.  Although we are working on integration with Seam 3. 

           

          However, you can bind ErraiService to JNDI by adding following to your ErraiService.properties:

           

          jndiName=java:/ErraiService

           

          Then you can look-up the service from your EJBs with:

           

          ErraiService svc = new InitialContext().lookup("java:/ErraiService");

           

          You can access the MessageBus by: svc.getBus(); and the dispatcher with: svc.getConfiguration().getRequestDispatcher();

           

          Note: you will need to use SVN trunk to access these features.  These features with be publicly released in Errai 1.1 in a few weeks.