Step 1: Creating a Database Connection

Previous topic
Previous
Next topic
Next

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:

  1. In the System Navigator, click the System tab to see the tree of files (the Run Manager pane is probably active right now).
  2. In the Navigator, right-click the Connections node and choose New Database Connection.
    The Connection Wizard opens.
  3. Review the information on the Welcome page and click Next.
  4. On the Type page, change the Connection Name to tutorial_jdbc_connection. Click Next.
  5. On the Authentication page, enter hr for the Username and Password. Select the checkbox for Deploy Password. Click Next.
  6. On the Connection page, enter the connection details for your database. If you do not know the details, ask your database administrator. Click Next.
  7. 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).
  8. Click Finish.

Now that you have a database connection established, you will create a CMP bean by dragging and dropping onto the UML diagram.