-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g
In this section we create an EJB 3.0 entity bean. Select the JPA project node in Project Explorer and select File | New. In the New window, select JPA | Entity and click on Next.

In the New JPA Entity window, we define an Entity class. Select the project in which the Entity class is to be created. Select the Source folder, specify a Java package, and specify a Class name. In Inheritance, select Entity. Click on Next, as shown in the following screenshot:

In the Entity Properties window, the Entity Name, Table Name, and Entity Fields are specified. Entity fields may be added with the Add button. Click on Finish. An EJB 3.0 entity bean class gets added to the JPA project. The Entity class Catalog is shown with code, which we shall discuss next:

Unlike EJB 2.0, in EJB 3.0 entity beans are Plain Old Java Objects (POJOs). Entity bean mappings are defined using annotations, which were introduced in JDK 5.0 and are in the javax.persistence package...
Change the font size
Change margin width
Change background colour