Resource References Property Editor

Tip 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:

  1. Click the References tab of the web.xml property sheet.
  2. Click the Resource References value field to make the ellipsis button appear.
  3. Then click the ellipsis button to display the property editor.

To add resource references:

  1. From the Resource References property editor, click the Add button. The Add Resource Reference dialog box appears.
  2. 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:
  3. 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.
  4. 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.
  5. 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.
  6. Click OK. The information you have specified is reflected in the Resource Reference property editor.

To edit a resource reference:

  1. 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.
  2. Edit the name of the resource reference in the Name text field.
  3. Edit the description of the resource reference in the Description text field.
  4. Change the type of the resource reference from the Type combo box.
  5. Change your specification of who has sign-on responsibility.
  6. Click OK. The information you have edited is reflected in the Resource Reference property editor.

To remove a resource reference:

  1. 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.
  2. Click OK to confirm the action or Cancel to stop the action.
See also
Editing Web Module References Properties

Legal Notices