-----Opprinnelig melding-----
Fra: Duffey, Kevin [mailto:[EMAIL PROTECTED]]
Sendt: 30. oktober 2000 21:25
Til: Orion-Interest
Emne: JNDI Properties? Why EJB can't find another EJB..Strange thing..I posted this a couple of times too. For some reason, I can NOT get my ejb to find another ejb. I am able to find both ejbs from the servlet just fine, but I can't get one ejb to use the other. Right now its one session trying to use another..but it worries me when it comes to entity CMP use. I can only think of one problem..that my ejb is not using the proper context. I do this in the ejb:
Context context = new InitialContext();
Object ref = context.lookup("java:comp/env/ejb/EJB2");
That always throws a NamingException (or it might be RemoteException..I can't remember which one it is that I always get).
So, looking at the ejb example(s) with Orion, it appears they all have a jndi.properties file with them, and I recall reading in my ejb book that supposedly each vendor has different settings. So the question is..do I need to create the context in one ejb with these properties set? What is the code used to find one ejb from inside another?
Thanks.
A
possible problem is that you have forgot to add ejb-refs for the beans you wish
to use from your bean on your bean in the deployment descriptor (ejb-jar.xml) in
the bean jar file.
Then
you will get problems like this...
Klaus
- JNDI Properties? Why EJB can't find another EJB.. Duffey, Kevin
- Re: JNDI Properties? Why EJB can't find another EJB.. Robert Krueger
- RE: JNDI Properties? Why EJB can't find another EJB.. Klaus . Myrseth
- RE: JNDI Properties? Why EJB can't find another EJB.. Duffey, Kevin