org.apache.openejb.jee
Class ResourceRef

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

public class ResourceRef
extends 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  List<Text> description
           
protected  String id
           
protected  List<InjectionTarget> injectionTarget
           
protected  String mappedName
           
protected  ResAuth resAuth
           
protected  String resRefName
           
protected  ResSharingScope resSharingScope
           
protected  String resType
           
 
Constructor Summary
ResourceRef()
           
ResourceRef(String resRefName, String resType)
           
ResourceRef(String resRefName, String resType, ResAuth resAuth, ResSharingScope resSharingScope)
           
 
Method Summary
 List<Text> getDescription()
           
 String getId()
           
 List<InjectionTarget> getInjectionTarget()
           
 String getKey()
          Gets the immutable key for this object.
 String getMappedName()
           
 String getName()
           
 ResAuth getResAuth()
           
 String getResRefName()
           
 ResSharingScope getResSharingScope()
           
 String getResType()
           
 String getType()
           
 void setId(String value)
           
 void setMappedName(String value)
           
 void setName(String name)
           
 void setResAuth(ResAuth value)
           
 void setResRefName(String value)
           
 void setResSharingScope(ResSharingScope value)
           
 void setResType(String value)
           
 void setType(String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

protected List<Text> description

resRefName

protected String resRefName

resType

protected String resType

resAuth

protected ResAuth resAuth

resSharingScope

protected ResSharingScope resSharingScope

mappedName

protected String mappedName

injectionTarget

protected List<InjectionTarget> injectionTarget

id

protected String id
Constructor Detail

ResourceRef

public ResourceRef()

ResourceRef

public ResourceRef(String resRefName,
                   String resType)

ResourceRef

public ResourceRef(String resRefName,
                   String resType,
                   ResAuth resAuth,
                   ResSharingScope resSharingScope)
Method Detail

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

getDescription

public List<Text> getDescription()

getResRefName

public String getResRefName()

setResRefName

public void setResRefName(String value)

getResType

public String getResType()

setResType

public void setResType(String value)

getResAuth

public ResAuth getResAuth()

setResAuth

public void setResAuth(ResAuth value)

getResSharingScope

public ResSharingScope getResSharingScope()

setResSharingScope

public void setResSharingScope(ResSharingScope 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.