1 Reply Latest reply on Sep 3, 2008 3:52 AM by jaikiran pai

    Having problem in accessing EJB from JSF

    Bimal Thapa Newbie

      Hello all,

      I am trying to access EJB from the JSF controller class. The method in EJB is not called. Please Suggest me. what to do.? how to make it run.

      The code to access EJB is as follows

      Properties props = new Properties();
      props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      props.setProperty("java.naming.provider.url", "localhost:1099");
      InitialContext ic = new InitialContext(props);
      DataSourceTryRemote hello = (DataSourceTryRemote) ic.lookup("DataSourceTryBean/remote");

      This code get well executed from client application and web modules but it is not working with JSF controller class.

      Can any body suggest me what to do.?

      In the anticipation of the Solution