Configuring JPA entity beans

  1. Create a JPA enabled dynamic Web project.

  2. Create a JPA entity bean.

To configure a JPA entity bean:

  1. In Enterprise Explorer, right-click the JPA entity bean that you want to configure and select

    Configure JPA Entities. The Configure JPA Entities wizard opens.

  2. In the Available JPA Entities list, select the JPA entity beans that you want to configure. Click Next.

  3. For each entity bean, you can configure:

    Primary Key

    For each JPA entity bean, specify the primary key. The primary key uniquely identifies each record in a set of data.

    Named Queries

    Add new queries, edit existing queries, or delete queries associated with a JPA entity. Named queries are used for querying and retrieving data from the database.

    Relationships

    Add new relationships between JPA entities or delete relationships.

    Concurrency Control

    Specify the optimistic lock value for the entity. The optimistic lock value ensures that correct results for concurrent operations are generated.

    Advanced options

    Set advanced options.

  4. When you have completed configuring the entity bean, click Finish.