Figure 10-25 JDBC data source definition

Binding the EJB to a JDBC data source

Each EJB module must be assigned to a JDBC data source reference in order for its CMP entities to persist correctly. To perform this assignment:

1.Switch the J2EE perspective. Select the J2EE Hierarchy view. Select the Customer bean. Right-click and select Open With —>Deployment Descriptor Editor. The editor will open with the bean’s tab selected.

2.Complete the data in the section labeled DataSource Binding Figure 10-26. Enter the JNDI name as jdbc/Airline, which matches the JNDI name for the data source created in Figure 10-25. Enter the user ID and password as db2admin.

3.Save the changes and close the editor.

Chapter 10. Development of XML-based Enterprise applications 249

Page 265
Image 265
IBM Version 5 manual Binding the EJB to a Jdbc data source, Jdbc data source definition