Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

resource-ref

Maps the res-ref-name in the corresponding J2EE deployment descriptor file resource-ref entry to the absolute jndi-name of a resource.


Note –

Connections acquired from JMS connection factories are not shareable in the current release of the Application Server. The res-sharing-scope element in the ejb-jar.xml file resource-ref element is ignored for JMS connection factories.

When resource-ref specifies a JMS connection factory for the Sun Java System Message Queue, the default-resource-principal (name/password) must exist in the Message Queue user repository. Refer to the Security Management chapter in the Sun Java System Message Queue 3 2005Q4 Administration Guide for information on how to manage the Message Queue user repository.


Superelements

sun-web-app (sun-web.xml), ejb (sun-ejb-jar.xml), sun-application-client (sun-application-client.xml)

Subelements

The following table describes subelements for the resource-ref element.

Table A–89 resource-ref Subelements

Element  

Required  

Description  

res-ref-name

only one 

Specifies the res-ref-name in the corresponding J2EE deployment descriptor file resource-ref entry.

jndi-name

only one 

Specifies the absolute jndi-name of a resource.

default-resource-principal

zero or one 

Specifies the default principal (user) for the resource. 

Example

<resource-ref>
   <res-ref-name>jdbc/EmployeeDBName</res-ref-name>
   <jndi-name>jdbc/EmployeeDB</jndi-name>
</resource-ref>