In this section we shall map an Oracle database table to an entity bean. Subsequently we shall discuss the components of the entity bean class.
In this section, we create an EJB 3 entity bean from the Oracle database table CATALOG that we created earlier. Select the EJB3Model project in the Application navigator and select File | New. In the New Gallery window, select Categories | Business Tier | EJB and Items | Entities from Tables, and click on OK.
In the Persistence Unit, window, select New to create a new persistence unit. In the New Persistence Unit window specify a persistence unit name (em). Specify JTA DataSource Name as jdbc/OracleDBConnectionDS, which is the datasource name corresponding to the OracleDBConnection connection. Select the default settings for Toplink: Server Platform as WebLogic 10. Click on OK.