Create or changing a resource reference
A resource reference supports application provider access to a resource (such as a data source, URL, or mail provider) using a logical name rather than the actual name in the run time environment. This ability insulates the application provider from the run time configuration, and simplifies the process of changing the run time configuration.
Resource references are declared in the deployment descriptor by the application provider. At some point in the application deployment process, bind the resource reference to the actual name of the resource in the run time environment.
- Start the Application Assembly Tool. Cancel the Welcome to the Application Assembly Tool window.
- Click File > Open. Find the EAR file you want to change, click the file name, and click Open.
- Display the resource references for the type of application component:
- If an enterprise bean uses the resource reference:
- Expand the name of the EAR file
- Expand EJB Modules
- Expand the EJB module wanted
- Expand the section for the appropriate type of enterprise bean (Session Beans or Entity Beans)
- Expand the enterprise bean
- If a servlet uses the resource reference:
- Expand the name of the EAR file
- Expand Web Modules
- Expand the Web module wanted
- If an application client uses the resource reference:
- Expand the name of the EAR file
- Expand Application Clients
- Expand the application client module wanted
- Click Resource References.
- Right-click Resource References and click New to display the new Resource Reference window.
- Specify settings.
- Click IBM Extensions and select the Isolation level.
- Click Bindings and fill in the JNDI name. One can choose to skip this step, as you are allowed to fill in or change this field during installation of the EAR file.
- Click OK.
- Save the EAR file. See Saving applications after assembly
- Generate the code. See Generating code for deployment
Data sources
Binding to a data source
Data access : Links
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.