Java Reference
In-Depth Information
Creating a database connection
To generate entity beans from the database tables we created earlier, we need
to create a database connection to Oracle database XE. As we are running the
application in the integrated WebLogic Server, we shall also be using the connection
for database persistence. Select the Database Navigator, right-click on the
EJB3RelationshipsJSF application node, and select New Connection .
In the Create Database Connection window, specify a Connection Name
( OracleDBConnection ) and select Connection Type as Oracle (JDBC) . Specify
Username as OE , as we created the database tables in the OE schema. Specify the
Password for the OE schema. Select Driver type as thin , specify Hostname as
localhost , and SID as XE . JDBC Port is 1521 by default. Click on OK :
A database connection gets created and added to the Database Navigator . The
Tables node displays the tables that we created:
 
Search WWH ::




Custom Search