Java Reference
In-Depth Information
Setting the environment
In the following sections, we will learn how to set up the environment.
Installing required products
First, download and install the following required products; when installing the
MySQL database, select the option to add the MySQL
bin
directory to the Windows
system
PATH
environment variable:
1. Oracle WebLogic Server 11
g
(
http://www.oracle.com/technology/
software/products/ias/htdocs/wls_main.html)
.
2. Oracle Enterprise Pack for Eclipse All-In-One edition (
http://www.oracle.
com/technology/software/products/oepe/oepe_11113.html
).
3. MySQL 5.x database (
http://www.oracle.com/us/products/mysql/
index.html
).
Creating a MySQL database table
Next, create a database table in the MySQL database as follows:
1. Log in to the MySQL database with the following command:
>mysql
2.
Set database as
test
:
mysql>use test
3. Run the following SQL script, which creates a
Catalog
table for the
EJB 3 entity:
CREATE TABLE Catalog (id INT PRIMARY KEY NOT NULL, journal
VARCHAR(100), publisher VARCHAR(100), date VARCHAR(100), title
VARCHAR(100), author VARCHAR(100));
The output from the
CREATE
TABLE
SQL script is shown in the following screenshot:
Search WWH ::
Custom Search