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"); hello.normalMethodToPrint();