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

    Remote client - @EJB

    Dmitry Guralnik Newbie

      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