| Author |
@EJB REMOTE
|
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.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.factory.url.pkgs",
"=org.jboss.naming rg.jnp.interfaces");
properties.put("java.naming.provider.url", "localhost:1099");
try{
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?
Thanks.
|
 |
Piotr Nowicki
Ranch Hand
Joined: Jul 13, 2010
Posts: 610
|
|
Hi,
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?
|
OCP Java SE 6 Programmer, OCM Java SE 6 Developer, OCE Java EE 6 JSPSD, OCE Java EE 6 EJBD, OCE Java EE 6 JPAD, Spring 3.0 Core Professional.
|
 |
 |
|
|
subject: @EJB REMOTE
|
|
|