!--a11y-->
Specifying JNDI Names for the Beans
References 
Use this procedure to specify the JNDI names of the enterprise beans, or the resources that are referenced by the bean. These JNDI names are the names under which the referenced enterprise beans or resources are registered in the JNDI namespace. You need to specify these names only if the information in the ejb-jar.xml is not sufficient to identify the referenced bean or resource.
For resource references, use this procedure if the resource reference name specified in ejb-jar.xml differs from the name with which the resource is registered in the JNDI.
The references are declared in ejb-jar.xml. For more information, see:
· Declaring resource references
...
1. Open the ejb-j2ee-engine.xml.
2. From the right-hand pane, choose the Enterprise Beans tab.
3. Open the corresponding tree structure according to the type of your enterprise bean (session, entity, or message-driven).
4. From your bean tree sub-structure, select ejb-ref, ejb-local-ref, resource-ref, or resource-env-ref to specify the JNDI name of the bean or resource in the corresponding reference.
5. Choose Add
A dialog box, which contains the corresponding references declared in ejb-jar.xml, appears.
6. Choose the reference and select OK.
The reference appears in the enterprise bean tree structure.
7. In the right-hand pane, specify the JNDI name of the referenced bean or resource.
a. If you specify a reference to an enterprise bean, the value of this field must be:
i. if you have already specified a custom JNDI name for your enterprise bean in the ejb-j2ee-engine.xml descriptor, the value of this tag must be the same.
ii. if you have not specified a custom JNDI name for your enterprise bean, then the JNDI name of the bean has the following format: applicationName/ejb-name.
For more information, see Specifying the Enterprise Bean’s JNDI Name.
b. If you specify a reference to a resource, the value of this field must be:
i.
for resources of type javax.sql.DataSource either the value of the
<data-source-name>, or the value of the
<alias> tag you specified in the
data-sources.xml
descriptor. Or if you used the
data-source-aliases.xml
instead, the value of this tag must be the same as the value of the
<alias> tag for the corresponding
DataSource.
ii.
for resources of type javax.jms.QueueConnectionFactory and javax.jms.TopicConnectionFactory either the value of the
<factory-name>, or the value of the
<alias>
tag you
specified in the
jms-factories.xml
descriptor.
iii.
for resources of type javax.resource.cci.ConnectionFactory either the value of the
<jndi-name> tag, or the value of the
<alias> tag you specified in the
connector-j2ee-engine.xml
descriptor. Or if you have not used the connector-j2ee-engine.xml descriptor
at all (since it is not mandatory), the value of this tag is equivalent to the
name of the corresponding RAR file (not including the .rar file
extension).
c.
If you specify a reference to an environment
resource, the value of this field must be the same as the name of the resource
environment entry that you specified in the <destination-name> element of the
jms-destinations.xml
descriptor.
8. Optionally, you can define the resource reference as non-transactional by choosing the Non transactional option.
