ResourceRef

The resource-ref element contains a declaration of application client's reference to an external resource. It consists of an optional description, the resource factory reference name, the indication of the resource factory type expected by the application client's code, and the type of authentication (bean or container).Example:<resource-ref><res-ref-name>EmployeeAppDB</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth></resource-ref>



 

Attributes Summary

description The description element is used by the ejb-jar file producer to provide text describing the parent element.
name The res-ref-name element specifies the name of the resource factory reference name.
type The res-type element specifies the type of the data source.
auth The res-auth element specifies whether the enterprise bean code signs on programmatically to the resource manager, or whether the Container will sign on to the resource manager on behalf of the bean.
link  
resSharingScope The res-sharing-scope element specifies whether connections obtainedthrough the given resource manager connection factory reference can beshared.

 

Attribute Details


description

The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element.

Data type:   String
Default value:   unspecified



name

The res-ref-name element specifies the name of the resource factory reference name. The resource factory reference name is the name of the application client's environment entry whose value contains the JNDI name of the data source.

Data type:   String
Default value:   unspecified



type

The res-type element specifies the type of the data source. The type is specified by the Java interface (or class) expected to be implemented by the data source.

Data type:   String
Default value:   unspecified



auth

The res-auth element specifies whether the enterprise bean code signs on programmatically to the resource manager, or whether the Container will sign on to the resource manager on behalf of the bean. In the latter case, the Container uses information that is supplied by the Deployer. The value of this element must be one of the two following:<res-auth>Application</res-auth><res-auth>Container</res-auth>

Data type:  ResAuthTypeBase
Default value:   unspecified
Allowed Values:  Container   Application   SERVLET   CONTAINER  



link

 

Data type:   String
Default value:   unspecified



resSharingScope

The res-sharing-scope element specifies whether connections obtainedthrough the given resource manager connection factory reference can beshared. The value of this element, if specified, must be one of thetwo following: Shareable, UnshareableThe default value is Shareable.

Data type:  ResSharingScopeType
Default value:   unspecified
Allowed Values:  Shareable   Unshareable