Before you can create entity beans from a table, you need a database connection
to the HR schema.
To create a database connection to the HR schema:
- In the System Navigator, click the System tab
to see the tree of files (the Run Manager pane is probably active right now).
- In the Navigator, right-click the Connections
node and choose New Database Connection.
The Connection Wizard opens.
- Review the information on the Welcome page and click Next.
- On the Type page, change the Connection Name
to
tutorial_jdbc_connection. Click Next.
- On the Authentication page, enter
hr for the Username
and Password. Select the checkbox for Deploy
Password. Click Next.
- On the Connection page, enter the connection details for your database.
If you do not know the details, ask your database administrator. Click Next.
- On the Test page, click Test Connection.
You should see a message of "Success" (if you do not, verify your
database connection details with your database administrator).
- Click Finish.
Now that you have a database connection established, you will create a CMP
bean by dragging and dropping onto the UML diagram.