Creating a datasource in JDeveloper
Next, we create a JDBC datasource in JDeveloper. We shall use the datasource in the EJB 3.0 entity bean for database persistence. First, we need to create a database table in some sample schema, OE
for example. Run the following SQL script in SQL *Plus:
CREATE TABLE Catalog (id INTEGER PRIMARY KEY NOT NULL, journal VARCHAR(100), publisher VARCHAR(100), edition VARCHAR(100), title VARCHAR(100), author VARCHAR(100));
A database table gets created in the OE
sample schema.
Next, we need to create a JDBC connection in JDeveloper with Oracle database. Open the Database Navigator or select the Database Navigator tab if already open. Right-click on the IDE Connections node and select New Connection.
In the Create Database Connection window, specify a Connection Name, select Connection Type as Oracle (JDBC), specify Username as OE, which is the schema in which the Catalog
table is created, and specify the password for the OE schema. Select Driver as thin, Host Name...