Setting the environment
We shall be using the WebLogic server integrated with JDeveloper 11g. Download and install JDeveloper 11g Studio edition (http://www.oracle.com/technology/software/products/middleware/index.html). We also need to download and install Oracle database (http://www.oracle.com/technology/software/products/database/index.html). Include the sample schemas when installing Oracle database. As we are using multiple entity beans, we need to create some database tables to which the entity beans are mapped.
Creating database tables
Create tables CATALOG, EDITION, SECTION
, and ARTICLE
with the following SQL scripts:
CREATE TABLE CATALOG (id INTEGER PRIMARY KEY NOT NULL, journal VARCHAR(100)); CREATE TABLE EDITION (id INTEGER PRIMARY KEY NOT NULL, edition VARCHAR(100)); CREATE TABLE SECTION (id VARCHAR(100) PRIMARY KEY NOT NULL, sectionName VARCHAR(100)); CREATE TABLE ARTICLE(id INTEGER PRIMARY KEY NOT NULL, title VARCHAR(100));
Creating an EJB project
First, we need to create an EJB...