EJB reference assembly settings
An EJB reference is a logical name used to locate the home interface of an enterprise bean used by an application.
At deployment, the EJB reference is bound to the enterprise bean's home in the target operational environment. The container makes the application's EJB references available in a JNDI naming context. It is recommended that references to enterprise beans be organized in the ejb subcontext of the application's environment (in java:comp/env/ejb ).
Name
- Specifies the JNDI name of the enterprise bean's home interface relative to the java:comp/env context.
For example, if ejb/EmplRecord is specified, the referring code looks up the enterprise bean's home interface at java:comp/env/ejb/EmplRecord. This JNDI name is an alias used by the code (the actual JNDI name is specified on the Binding tab).
Description
- Contains text that describes the EJB reference.
Link
- Used to link an EJB reference to an enterprise bean in the current module (the same module as the one making the reference) or in another module within the same J2EE application. This setting specifies the name of the target enterprise bean.
The target enterprise bean can be in any EJB module in the same J2EE application as the referring module. To avoid having to rename enterprise beans to have unique names within an J2EE application, specify the path name of the EJB archive file that contains the referenced enterprise bean and append the target bean's name, separated by a # symbol (for example, ...products/product.jar#ProductEJB ). The path name is relative to the referring module's archive file specification. If a link is not specified, the reference must be resolved to a JNDI name during installation.
Home
- Specifies the fully qualified name of the enterprise bean's home interface (for example, com.ibm.ejbs.EmplRecordHome).
Remote
- Specifies the fully qualified name of the enterprise bean's remote interface (for example, com.ibm.ejbs.EmplRecord).
Type
- Specifies the expected type of the referenced enterprise bean.
Data type String Default None; must be set Range Entity or Session
JNDI name
- Binding information that is used by the run-time environment to resolve the location of a resource.
For EJB references, the value of this setting must match the JNDI name of the enterprise bean as it was specified on the Binding tab for the EJB module that contains the bean.
References
Assembling EJB modules
Developing applications that use JNDI
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.