geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mahu2425" <>
Subject Access bean from another - JNDI name
Date Tue, 16 May 2006 09:51:39 GMT
Hi there,

I'm trying to access an entity bean from a stateless session bean and I'm running into a "javax.naming.NameNotFoundException"
while executing the followin statement:


ctx is an InitialContext without parameters. Both EJBs are running on the same server and
and are in the same archive.

My ejb-jar.xml contains the following code (I will leave out tags like cmp-fields in this
posting, btw: the session bean serves additionally as a web service):


	<description>Test entity bean</description>

My openejb-jar.xml contains the following code (I'll leave out things like cmp-mappings in
this posting)


As I said before, a lookup is not possible. 

During several tries I changed the <jndi-name> for the entity bean in openejb-jar.xml
 to <jndi-name>ejb/MyEntity</jndi-name> 

and the <ejb-ref-name> in ejb-jar-xml to

And magic: the lookup works. Unfortuanally I can not understand why. Is a leading "ejb/" required
for jndi name? I don't think so, because I could not find anything similar in any tutorial.
But what is the difference or what are the underlying rules?



Schnell und einfach ohne Anschlusswechsel zur Lycos DSL Flatrate wechseln und 3 Monate kostenlos
ab effektiven 5,21 EUR pro Monat im ersten Jahr surfen.
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message