org.apache.openejb.jee
Class ResourceRef

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

public class ResourceRef
extends java.lang.Object
implements JndiReference

The resource-refType contains a declaration of a Deployment Component's reference to an external resource. It consists of an optional description, the resource manager connection factory reference name, an optional indication of the resource manager connection factory type expected by the Deployment Component code, an optional type of authentication (Application or Container), and an optional specification of the shareability of connections obtained from the resource (Shareable or Unshareable).

It also includes optional elements to define injection of the named resource into fields or JavaBeans properties.

The connection factory type must be supplied unless an injection target is specified, in which case the type of the target is used. If both are specified, the type must be assignment compatible with the type of the injection target.

Example:

jdbc/EmployeeAppDB javax.sql.DataSource Container Shareable


Field Summary
protected  java.util.List<Text> description
           
protected  java.lang.String id
           
protected  java.util.List<InjectionTarget> injectionTarget
           
protected  java.lang.String mappedName
           
protected  ResAuth resAuth
           
protected  java.lang.String resRefName
           
protected  ResSharingScope resSharingScope
           
protected  java.lang.String resType
           
 
Constructor Summary
ResourceRef()
           
ResourceRef(java.lang.String resRefName, java.lang.String resType)
           
ResourceRef(java.lang.String resRefName, java.lang.String resType, ResAuth resAuth, ResSharingScope resSharingScope)
           
 
Method Summary
 java.util.List<Text> getDescription()
           
 java.lang.String getId()
           
 java.util.List<InjectionTarget> getInjectionTarget()
           
 java.lang.String getKey()
          Gets the immutable key for this object.
 java.lang.String getMappedName()
           
 java.lang.String getName()
           
 ResAuth getResAuth()
           
 java.lang.String getResRefName()
           
 ResSharingScope getResSharingScope()
           
 java.lang.String getResType()
           
 java.lang.String getType()
           
 void setId(java.lang.String value)
           
 void setMappedName(java.lang.String value)
           
 void setName(java.lang.String name)
           
 void setResAuth(ResAuth value)
           
 void setResRefName(java.lang.String value)
           
 void setResSharingScope(ResSharingScope value)
           
 void setResType(java.lang.String value)
           
 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

resRefName

protected java.lang.String resRefName

resType

protected java.lang.String resType

resAuth

protected ResAuth resAuth

resSharingScope

protected ResSharingScope resSharingScope

mappedName

protected java.lang.String mappedName

injectionTarget

protected java.util.List<InjectionTarget> injectionTarget

id

protected java.lang.String id
Constructor Detail

ResourceRef

public ResourceRef()

ResourceRef

public ResourceRef(java.lang.String resRefName,
                   java.lang.String resType)

ResourceRef

public ResourceRef(java.lang.String resRefName,
                   java.lang.String resType,
                   ResAuth resAuth,
                   ResSharingScope resSharingScope)
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()

getResRefName

public java.lang.String getResRefName()

setResRefName

public void setResRefName(java.lang.String value)

getResType

public java.lang.String getResType()

setResType

public void setResType(java.lang.String value)

getResAuth

public ResAuth getResAuth()

setResAuth

public void setResAuth(ResAuth value)

getResSharingScope

public ResSharingScope getResSharingScope()

setResSharingScope

public void setResSharingScope(ResSharingScope value)

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.