[jboss-dev-forums] [JBoss AS 7 Development] - Re: Can't find stateless ejb from web project in Jboss AS 7.1

kola ye do-not-reply at jboss.com
Mon Dec 24 00:58:53 EST 2012


kola ye [https://community.jboss.org/people/kolaye] created the discussion

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

To view the discussion, visit: https://community.jboss.org/message/784803#784803

--------------------------------------------------------------
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
[https://community.jboss.org/message/784803#784803]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20121224/e2987bcc/attachment.html 


More information about the jboss-dev-forums mailing list