org.apache.openejb.jee
Class EjbRef
java.lang.Object
org.apache.openejb.jee.EjbRef
- All Implemented Interfaces:
- EjbReference, Injectable, JndiReference, Keyable<String>
public class EjbRef
- extends Object
- implements EjbReference
The ejb-refType is used by ejb-ref elements for the
declaration of a reference to an enterprise bean's home or
to the remote business interface of a 3.0 bean.
The declaration consists of:
- an optional description
- the EJB reference name used in the code of
the Deployment Component that's referencing the enterprise
bean.
- the optional expected type of the referenced enterprise bean
- the optional remote interface of the referenced enterprise bean
or the remote business interface of the referenced enterprise
bean
- the optional expected home interface of the referenced
enterprise bean. Not applicable if this ejb-ref
refers to the remote business interface of a 3.0 bean.
- optional ejb-link information, used to specify the
referenced enterprise bean
- optional elements to define injection of the named enterprise
bean into a component field or property
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
description
protected List<Text> description
ejbRefName
protected String ejbRefName
ejbRefType
protected EjbRefType ejbRefType
home
protected String home
remote
protected String remote
ejbLink
protected String ejbLink
mappedName
protected String mappedName
injectionTarget
protected List<InjectionTarget> injectionTarget
id
protected String id
refType
protected EjbReference.Type refType
EjbRef
public EjbRef()
getRefType
public EjbReference.Type getRefType()
- Specified by:
getRefType
in interface EjbReference
setRefType
public void setRefType(EjbReference.Type refType)
- Specified by:
setRefType
in interface EjbReference
getDescription
public List<Text> getDescription()
- Specified by:
getDescription
in interface EjbReference
getEjbRefName
public String getEjbRefName()
getName
public String getName()
- Specified by:
getName
in interface JndiReference
getKey
public String getKey()
- Description copied from interface:
Keyable
- Gets the immutable key for this object.
- Specified by:
getKey
in interface Keyable<String>
- Returns:
- gets the immutable key for this object
getType
public String getType()
- Specified by:
getType
in interface JndiReference
setName
public void setName(String name)
- Specified by:
setName
in interface JndiReference
setType
public void setType(String type)
- Specified by:
setType
in interface JndiReference
setEjbRefName
public void setEjbRefName(String value)
- The ejb-ref-name element contains the name of an EJB
reference. The EJB reference is an entry in the
Deployment Component's environment and is relative to the
java:comp/env context. The name must be unique within the
Deployment Component.
It is recommended that name is prefixed with "ejb/".
Example:
ejb/Payroll
getEjbRefType
public EjbRefType getEjbRefType()
- Specified by:
getEjbRefType
in interface EjbReference
setEjbRefType
public void setEjbRefType(EjbRefType value)
getHome
public String getHome()
- Specified by:
getHome
in interface EjbReference
setHome
public void setHome(String value)
getRemote
public String getRemote()
getInterface
public String getInterface()
- Specified by:
getInterface
in interface EjbReference
setRemote
public void setRemote(String value)
getEjbLink
public String getEjbLink()
- The value of the ejb-link element must be the ejb-name of an
enterprise bean in the same ejb-jar file or in another ejb-jar
file in the same Java EE application unit.
Alternatively, the name in the ejb-link element may be
composed of a path name specifying the ejb-jar containing the
referenced enterprise bean with the ejb-name of the target
bean appended and separated from the path name by "#". The
path name is relative to the Deployment File containing
Deployment Component that is referencing the enterprise
bean. This allows multiple enterprise beans with the same
ejb-name to be uniquely identified.
Examples:
EmployeeRecord
../products/product.jar#ProductEJB
- Specified by:
getEjbLink
in interface EjbReference
setEjbLink
public void setEjbLink(String value)
getMappedName
public String getMappedName()
- Specified by:
getMappedName
in interface JndiReference
setMappedName
public void setMappedName(String value)
- Specified by:
setMappedName
in interface JndiReference
getInjectionTarget
public List<InjectionTarget> getInjectionTarget()
- Specified by:
getInjectionTarget
in interface Injectable
getId
public String getId()
setId
public void setId(String value)
Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.