Stumped on EJB problem?

H

harry

I have several (local) stateless session EJB's.

From my app I can get a reference to one using something like -

home = (EJBLocalHome) context.lookup("java:comp/env/ejb/ejb1");

but trying to get a reference to another one from a method within ejb1 I
have to use -

home = (EJBLocalHome) context.lookup("ejb/ejb2");

without the "java:comp/env/" bit otherwise I get a NamingException thrown

I am completely stumped as to why this should happen - any ideas?

thanks

harry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top