You can connect to the database to generate and configure JPA entities.
Before you can connect to the database, you must stop
the server. To stop the server, right-click your server, in the Server view,
and select Stop. Wait for the server to stop before
you create the connection to the database.
- In Enterprise Explorer, right-click EmployeeListWeb and
select Properties. The Properties for EmployeeListWeb
window opens.
- Click JPA.
- Make sure that RAD JPA Platform is selected
in the Platform list.
- Click Add connection. The New Connection
Profile wizard opens.
- In the connection profile type list, click Derby in
the connection profile type list then click Next. The
Derby Embedded Database wizard opens.
- Name your connection EmployeeDB. Click Auto-connect
at startup and click Next.
- On the Specify a Driver and Connection Details of the wizard, select Derby
10.2 - Embedded JDBC Driver Default from the Drivers list.
- In the Database location field, of the General Properties tab of
the wizard, click Browse and select <workspace_location>EmployeeListWeb\WebContent\sample and click OK.
- Click Test connection to ensure that you
can connect to the derby database. On the Success dialog click OK.
Click Next.
- Click Finish to complete the connection
to the derby database. Click Apply to apply the changes
to your Web project. Click OK.