@ejb.ejb-ref

Scope: Class

Multiplicity

(0..*): You can use this tag zero to many times in the Java™ source file.

Purpose

This tag defines an EJB-reference to the bean with EJB-name. The ref-name value is optional and if not specified, then the reference name is [ejb-name] prefixed by ejb/.

Note

You must import the referred class (the ejbdoclet one) even if your EJB does not need it to the bean with the EJB-name. The ref-name is optional; if not specified, then the reference name is the EJB-name prefixed by ejb/.

Parameters

Parameter Type Applicability Description Mandatory
ejb-name text   The name of the EJB being referenced. true
view-type text   The view-type that the reference uses. You must specify one of the following attributes:
  • local
  • remote
The default value is
  • remote
true
ref-name text   The name that the referenced bean is called. For example, the bean Customer as java:comp/env/ejb/Customer name is ejb/Customer. The default value is ejb/[ejb-name], where [ejb-name] is the name of the referenced bean. false

Feedback