3 Replies Latest reply on Jan 2, 2007 1:31 PM by peterj

    Remote client - @EJB

    dguralnik

      Hi,

      I've got a problem in my test remote appplication:

      public class TerminalTest {
      @EJB(name = "mcp/TerminalDao/remote")
      private TerminalDao terminalDao;

      public TerminalDaoTest() {
      //try {
      // InitialContext ctx = new InitialContext();
      // terminalDao = (TerminalDao) ctx.lookup("mcp/TerminalDao/remote");
      //} catch (Exception e) {

      //}
      }
      .....
      }
      It is definition of TerminalDao:

      @Remote
      public interface TerminalDao {
      ....
      }

      I cann't understand why terminalDao attribute is not inizialized by @EJB. All works well when I uncomment the code in the constructor.

      Thank you.

      Best regards,
      Dmitry

        • 1. Re: Remote client - @EJB
          peterj

          Which version of JBoss are you using? I don't think that any of the 4.0.x versions have supports to EJB-related annotations on the client. That will not come in until 5.0 and I don't know if beta 1 has that support.

          • 2. Re: Remote client - @EJB
            dguralnik

            It is 4.0.5.

            • 3. Re: Remote client - @EJB
              peterj

              With 4.0.5, you will have to look up the EJB using JNDI, the client-side annotations will not work. You could try 5.0 beta 1 to see if the client annotations work there (I haven't tried this yet and have not seen any definitive statements on this from the JBoss team, nor have I searched JIRA to see if there is anything there about this issue)