@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 will be called. For example, the bean Customer as java:comp/env/ejb/Customer name will be called ejb/Customer. The default value is ejb/[ejb-name], where [ejb-name] is the name of the referenced bean. false
Related reference
@ejb.bean
@ejb.create-method
@ejb.ejb-external-ref
@ejb.env-entry
@ejb.facade
@ejb.facade-method
@ejb.finder
@ejb.home
@ejb.home-method
@ejb.interface
@ejb.interface-method
@ejb.permission
@ejb.persistence
@ejb.persistence (method)
@ejb.pk
@ejb.pk-field
@ejb.relation
@ejb.remote-facade
@ejb.resource-env-ref
@ejb.resource-ref
@ejb.security-identity
@ejb.security-role-ref
@ejb.select
@ejb.session
@ejb.transaction
@ejb.util
@ejb.value-object
@ejb.value-object-method
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.