Converting a Java Project to a JPA Project

Use this procedure to convert an existing Java project to a JPA project.

  1. From the Navigator or Project explorer, right-click the Java project and then select Configure > Convert to JPA Project. The Project Facets page of the Modify Faceted Project wizard appears.

    Modify Faceted Project Page


  2. Change the Configuration to Default JPA Configuration.

  3. Click Next. JPA Facet page appears.

    JPA Facet Page


  4. Complete the fields on the JPA Facet page to specify your vender-specific platform, JPA implementation library, and database connection.

    Click Manage libraries to create or update your JPA user libraries. Click Download libraries to obtain additional JPA implementation libraries.

    If Dali derives the incorrect schema, select Override the Default Schema for Connection. Using this option, you can select a development time schema for defaults and validation.

    If you clear the Create orm.xml option (which is selected by default), you can later add a mapping file to the project using the Mapping File Wizard.

  5. Click Finish.

The Dali OR Mapping Tool adds the JPA implementation libraries to your project and creates the necessary orm.xml and perisistence.xml files.

 

Related reference

Create New JPA Project wizard
JPA Development perspective
Mapping File Wizard

 

Related tasks

Managing the persistence.xml file
Adding persistence to a class
Creating a new JPA project

 

Related concept

Understanding Java persistence
The persistence.xml file