org.apache.openejb.jee
Class EjbLocalRef

java.lang.Object
  extended by org.apache.openejb.jee.EjbLocalRef
All Implemented Interfaces:
EjbReference, Injectable, JndiReference, Keyable<java.lang.String>

public class EjbLocalRef
extends java.lang.Object
implements EjbReference

The ejb-local-refType is used by ejb-local-ref elements for the declaration of a reference to an enterprise bean's local home or to the local 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 expected local interface of the referenced enterprise bean or the local business interface of the referenced enterprise bean. - the optional expected local home interface of the referenced enterprise bean. Not applicable if this ejb-local-ref refers to the local 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.openejb.jee.EjbReference
EjbReference.Type
 
Field Summary
protected  java.util.List<Text> description
           
protected  java.lang.String ejbLink
           
protected  java.lang.String ejbRefName
           
protected  EjbRefType ejbRefType
           
protected  java.lang.String id
           
protected  java.util.List<InjectionTarget> injectionTarget
           
protected  java.lang.String local
           
protected  java.lang.String localHome
           
protected  java.lang.String mappedName
           
 
Constructor Summary
EjbLocalRef()
           
EjbLocalRef(EjbReference ref)
           
EjbLocalRef(java.lang.String ejbRefName, java.lang.String ejbLink)
           
 
Method Summary
 java.util.List<Text> getDescription()
           
 java.lang.String getEjbLink()
           
 java.lang.String getEjbRefName()
           
 EjbRefType getEjbRefType()
           
 java.lang.String getHome()
           
 java.lang.String getId()
           
 java.util.List<InjectionTarget> getInjectionTarget()
           
 java.lang.String getInterface()
           
 java.lang.String getKey()
          Gets the immutable key for this object.
 java.lang.String getLocal()
           
 java.lang.String getLocalHome()
           
 java.lang.String getMappedName()
           
 java.lang.String getName()
           
 EjbReference.Type getRefType()
           
 java.lang.String getType()
           
 void setEjbLink(java.lang.String value)
          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.
 void setEjbRefName(java.lang.String value)
          The ejb-ref-name element contains the name of an EJB reference.
 void setEjbRefType(EjbRefType value)
           
 void setId(java.lang.String value)
           
 void setLocal(java.lang.String value)
           
 void setLocalHome(java.lang.String value)
           
 void setMappedName(java.lang.String value)
           
 void setName(java.lang.String name)
           
 void setRefType(EjbReference.Type refType)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

protected java.util.List<Text> description

ejbRefName

protected java.lang.String ejbRefName

ejbRefType

protected EjbRefType ejbRefType

localHome

protected java.lang.String localHome

local

protected java.lang.String local

ejbLink

protected java.lang.String ejbLink

mappedName

protected java.lang.String mappedName

injectionTarget

protected java.util.List<InjectionTarget> injectionTarget

id

protected java.lang.String id
Constructor Detail

EjbLocalRef

public EjbLocalRef()

EjbLocalRef

public EjbLocalRef(java.lang.String ejbRefName,
                   java.lang.String ejbLink)

EjbLocalRef

public EjbLocalRef(EjbReference ref)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface JndiReference

getKey

public java.lang.String getKey()
Description copied from interface: Keyable
Gets the immutable key for this object.

Specified by:
getKey in interface Keyable<java.lang.String>
Returns:
gets the immutable key for this object

getType

public java.lang.String getType()
Specified by:
getType in interface JndiReference

setName

public void setName(java.lang.String name)
Specified by:
setName in interface JndiReference

setType

public void setType(java.lang.String type)
Specified by:
setType in interface JndiReference

getDescription

public java.util.List<Text> getDescription()
Specified by:
getDescription in interface EjbReference

getEjbRefName

public java.lang.String getEjbRefName()

setEjbRefName

public void setEjbRefName(java.lang.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)

getLocalHome

public java.lang.String getLocalHome()

getHome

public java.lang.String getHome()
Specified by:
getHome in interface EjbReference

getInterface

public java.lang.String getInterface()
Specified by:
getInterface in interface EjbReference

getRefType

public EjbReference.Type getRefType()
Specified by:
getRefType in interface EjbReference

setRefType

public void setRefType(EjbReference.Type refType)
Specified by:
setRefType in interface EjbReference

setLocalHome

public void setLocalHome(java.lang.String value)

getLocal

public java.lang.String getLocal()

setLocal

public void setLocal(java.lang.String value)

getEjbLink

public java.lang.String getEjbLink()
Specified by:
getEjbLink in interface EjbReference

setEjbLink

public void setEjbLink(java.lang.String value)
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


getMappedName

public java.lang.String getMappedName()
Specified by:
getMappedName in interface JndiReference

setMappedName

public void setMappedName(java.lang.String value)
Specified by:
setMappedName in interface JndiReference

getInjectionTarget

public java.util.List<InjectionTarget> getInjectionTarget()
Specified by:
getInjectionTarget in interface Injectable

getId

public java.lang.String getId()

setId

public void setId(java.lang.String value)


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.