File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes @EJB REMOTE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "@EJB REMOTE" Watch "@EJB REMOTE" New topic


Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
Hi I have type the code below in an EJB and I am trying to connect with another EJB in the same server:

Properties properties = new Properties();


properties.put("java.naming.provider.url", "localhost:1099");
Context ctx = new InitialContext(properties);
HolaMundoEJBREMOTORemote hello = null;

hello = (HolaMundoEJBREMOTORemote) ctx.lookup("HolaMundoEJBREMOTO/remote");

when I run the app(main), the error below appears:

ERROR [STDERR] javax.naming.NameNotFoundException: HolaMundoEJBREMOTO

Please ┬┐anybody knows what is happening?

Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610


1. Please use the code tags, as it makes the code a lot easier to read,
2. What are the classes or JNDI names of the EJB's you're trying to inject / use as a point of injection,
3. What EJB version are you using?
I agree. Here's the link:
subject: @EJB REMOTE
It's not a secret anymore!