[jboss-user] [EJB 3.0] - Having problem in accessing EJB from JSF

mabimal do-not-reply at jboss.com
Tue Sep 2 07:54:59 EDT 2008


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();            
  | 

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
Mabimal



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173721#4173721

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173721



More information about the jboss-user mailing list