Resource References

The Resource References page of the Edit Enterprise Bean Wizard will display as part of the wizard when the Resource References option is selected on the Configuration Options page of this wizard.

Use the Resource References page to declare referenced in the code of this enterprise bean. For each of the resource factories, indicate the type of resource required and how the authentication of resource users will be handled (application-managed or container-managed).

Adding Resource Factories

To specify a resource factory that is referenced in the code of this enterprise bean:

  1. Click Add to declare a resource factory.
  2. In the Coded Name column, enter the . For example, if the JNDI lookup of a DataSource resource is java:comp/env/jdbc/TheDataSource , enter jdbc/TheDataSource .
  3. In the Type column, select the from the drop-down list.
  4. In the Authentication column, select either Application or Container from the drop-down list in to indicate whether you want the authentication of resource users to be managed by the enterprise bean or by the container.
  5. Select or deselect the checkbox in the Sharable column. Deselect the checkbox if the connections obtained through the resource factory reference cannot be shared. The default value is Shareable.
  6. Optionally, click the folded paper icon in the rightmost column to enter a description of the resource.
  7. For each resource reference in the list, enter or select the JNDI name of the resource factory into the JNDI Name field. The JNDI name is used by the client to locate the resource at runtime.
  8. If you are adding a resource that requires a user name and password, enter them in the User Name and Password fields.

Editing Resource Factories

To edit a resource factory, select the cell in the table that you want to edit and enter or select the new value.

Deleting Resource Factories

To delete a reference, select the row containing the reference and click Delete. A confirmation dialog will ask you to confirm the deletion.


Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved.