Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI name and ejb-name in ejb-jar.xml  RSS feed

 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the JNDI name the same as the <ejb-name> in ejb-jar.xml? If they are not the same, what
the content of <ejb-name> is for?
[ September 22, 2002: Message edited by: Jane Smith ]
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jane Smith:
Is the JNDI name the same as the <ejb-name> in ejb-jar.xml?

not necessarily.

If they are not the same, what
the content of <ejb-name> is for?


The ejb-name element specifies an enterprise bean's name. This name is
assigned by the ejb-jar file producer to name the enterprise bean in
the ejb-jar file's deployment descriptor. The name must be unique
among the names of the enterprise beans in the same ejb-jar file.

you can find all the description of the ejb-jar.xml here:
http://java.sun.com/dtd/ejb-jar_2_0.dtd
hope it helps
 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is the JNDI name assigned? Who uses it?
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jndi name is assigned in whatever way the appserver vendor does it, usually in an extra deployment descriptor. For example, in WebLogic, it is specified in the weblogic-ejb-jar.xml.
The jndi name is used by any component that needs to look up the ejb in order to use it.
Sometimes, the "global" jndi name might be optional if all users of the bean can access it via ejb-ref/ejb-link.
 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how websphere4 assigns jndi-name?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!