Java Reference
In-Depth Information
Creating an entity bean
Next, we create an EJB 3.0 entity bean from the Oracle database table CATALOG that
we created earlier. Here's how to go about it:
1.
Select the EJB3Model project in the Application navigator and select
File | New .
2.
In the New Gallery window, select Categories | Business Tier | EJB and
Items | Entities from Tables and click on OK .
3.
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 ).
4.
Specify JTA DataSource Name as jdbc/OracleDBConnectionDS , which is
the data source name corresponding to the OracleDBConnection connection.
5.
Select the settings for Toplink ; Database Platform as Oracle and Server
Platform as WebLogic 10 . Click on OK .
6.
The em Persistence Unit gets created. Click on OK in the Persistence Unit
window.
7.
Select Type of Connection as Online Database Connection and click on
Next .
8.
In the Database Connection Details window, select the
OracleDBConnection and click on Next .
9.
In the Select Tables window, select Schema as OE , Name Filter as % , and
check the Auto-Query checkbox.
 
Search WWH ::




Custom Search