Resource References Property Editor
 |
Note that this feature might not be included in
your version of the IDE. If it is not available, you can edit the deployment
descriptor (web.xml) file using the editor of your choice.
For more information, see Java Servlet 2.3 Specification available
at http://java.sun.com/products/servlet . |
You can use the Resource References property editor to specify, edit, and remove
resource references in the web module. Resource references declare connection
factories such as javax.sql.DataSource objects. Developers must declare
a resource factory reference in the web module if any component performs a JNDI
lookup of a resource factory reference. Each entry corresponds to a <resource-ref>
element in the deployment descriptor.
To display the Resource References property editor:
- Click the References tab of the web.xml property sheet.
- Click the Resource References value field to make the ellipsis button
appear.
- Then click the ellipsis button to display the property editor.
To add resource references:
- From the Resource References property editor, click the Add button.
The Add Resource Reference dialog box appears.
- Type the name of the resource reference in the Name text field. This name
should be identical to the resource factory reference name in the lookup code.
Examples might include
jdbc/HRdatabase
, jms/RequestQueue
,
mail/MailServer
, url/URLLocator
. Note that developers
are encouraged but not required to organize resource factory references in
the appropriate subcontext as follows:
- The javax.sql.DataSource factories go in
jdbc
subcontext.
- JMS connection factories go in
jms
subcontext, JavaMail connection
factories go in mail
subcontext.
- URL connection factories go in
url
subcontext.
- Type an optional description of the resource reference in the Description text field.
For instance, type Connection factory for HR database connections or
Connection factory for mail server.
- Enter the type of the resource reference from the Type combo box.
What you enter depends on the type of connection that you want.
Note that an alternate connection factory type can be entered.
- Specify who has sign-on responsibility. If the application code provides the user name and password
to establish the connection, the value is Application. If the deployer uses the
container's tools to
specify the user name and password for the connection, the value is Container.
- Click OK. The information you have specified is reflected in the Resource
Reference property editor.
To edit a resource reference:
- From the Resource References property editor, select the row containing
the desired resource reference information, and click the Edit button.The
Edit Resource Reference dialog box appears.
- Edit the name of the resource reference in the Name text field.
- Edit the description of the resource reference in the Description text field.
- Change the type of the resource reference from the Type combo box.
- Change your specification of who has sign-on responsibility.
- Click OK. The information you have edited is reflected in the Resource Reference
property editor.
To remove a resource reference:
- From the Resource References property editor,
select the row containing the desired resource reference information, and click
the Remove button.
The resource reference is removed from the table.
- Click OK to confirm the action or Cancel to stop the action.
Legal Notices