JBoss Community

Re: Can't find stateless ejb from web project in Jboss AS 7.1

created by kola ye in JBoss AS 7 Development - View the full discussion

Hi,Ali

  The jndi context and lookup source code are below:

 

  jndiProps = new Hashtable<String, Object>();

  jndiProps.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

  InitialContext  ctx = new InitialContext(jndiProps);

 

  String ejbname = "ejb:" + appName + "/" + moduleName + "/" + distinctName + "UsersDao!com.hxchn.sms.UsersDaoRemote";

  UsersDaoRemote usersDaoRemote=(UsersDaoRemote)ctx.lookup(ejbname);

 

  do you put your Web Project and Ejb Project into one Project?It's very import!

 

  Kola

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community