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: <resource-ref> <res-ref-name>jdbc/EmployeeAppDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> |
QName | Type | Fixed | Default | Use | Inheritable | Annotation |
---|---|---|---|---|---|---|
id | xsd:ID | optional |
<xsd:complexType name="resource-refType"> <xsd:annotation> <xsd:documentation> <![CDATA[ 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: <resource-ref> <res-ref-name>jdbc/EmployeeAppDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> ]]> </xsd:documentation> </xsd:annotation> <xsd:sequence> <xsd:element name="description" type="javaee:descriptionType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="res-ref-name" type="javaee:jndi-nameType"> <xsd:annotation> <xsd:documentation>The res-ref-name element specifies the name of a resource manager connection factory reference. The name is a JNDI name relative to the java:comp/env context. The name must be unique within a Deployment File.</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="res-type" type="javaee:fully-qualified-classType" minOccurs="0"> <xsd:annotation> <xsd:documentation>The res-type element specifies the type of the data source. The type is specified by the fully qualified Java language class or interface expected to be implemented by the data source.</xsd:documentation> </xsd:annotation> </xsd:element> <xsd:element name="res-auth" type="javaee:res-authType" minOccurs="0"/> <xsd:element name="res-sharing-scope" type="javaee:res-sharing-scopeType" minOccurs="0"/> <xsd:group ref="javaee:resourceGroup"/> </xsd:sequence> <xsd:attribute name="id" type="xsd:ID"/> </xsd:complexType> |