appendix a by luckboy

VIEWS: 117 PAGES: 5

More Info
									Appendix A - Importing Projects into RAD
If you do not finish a Lab, skip an exercise, or for any reason want to work on a Lab out of order, you can select a new workspace. Follow the Instructions in this appendix to build a startup workspace for an exercise. The following steps describe how to create a startup workspace for any lab if the preceding Lab was not completed. This technique uses the Project Interchange (PI) format. Note: 1. The PI technique does not save the generated deploy code for EJBs, so the deploy code must be regenerated upon import. 2. With Rational Application Developer, any administrative setup of the test server is not stored in the project code, so server setup (datasources, message queues, and so forth) may still need to be performed after import. 3. The import file (in PI & ZIP format) can be found in the AdvL2EELabs/<lab dir> directory with a name of lab<index>Import.zip.

Step 1: Open Application Developer
__ 1. If not already running, open Application Developer. __ a. A dialog similar to the following appears. If it does not, click Cancel and follow the instructions in the section Enabling the SetWorkspace dialog at the end of this appendix. Then try again.

Appendix A - Importing Projects into RAD

1

__ b. Enter your current workspace directory, and press OK.

Step 2: Delete Projects that Are About to Be Imported
__ 1. The PI zip file will bring in projects that are the starting point for the lab. If these projects already exist in your workspace, you need to delete these projects before

Step 3: Import the Projects via a Project Interchange zip file
__ 1. Make sure you are in the J2EE Perspective. The first word in the title bar of the workbench is the perspective name and should say “J2EE”. __ 2. From the File menu, select Import.... __ 3. When the Import dialog opens, select Project Interchange. Click Next. __ 4. When the Import Project Interchange Contents dialog opens, click Browse and navigate to the workspace folder for the current exercise. This will populate the listbox with the projects available in the zip file. Press the Select All button, and then Finish. __ 5. The selected projects will be populated in the Project Explorer view. Generated EJB deployment code is not carried in the PI file, so regenerate this deploy code before testing.

Appendix A - Importing Projects into RAD

2

Appendix B – Training Web Service Application Database Reference
This appendix contains instructions on how to reset the Training database and also contains the definitions of each table in the database.

How To Reset the Training Database - trainingDB
The following procedure resets the Training database to its initial state.

Creating the training database using a MySQL database server Open SQL Manager 2007 for MySQL and run creatdb.mysql script (in AdvJ2EELabs\WebService\TrainingDB)

Appendix B – Training Web Service Application Database Reference

1

createdb.mysql DROP DATABASE IF EXISTS trainingDB;

CREATE DATABASE trainingDB;

CREATE TABLE course ( course_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, course_name VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (course_id) );

CREATE TABLE student ( student_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, student_name VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (student_id) );

CREATE TABLE enrollment ( course_id BIGINT UNSIGNED NOT NULL, student_id BIGINT UNSIGNED NOT NULL, PRIMARY KEY (course_id, student_id), FOREIGN KEY (course_id) REFERENCES course(course_id) ON DELETE RESTRICT, FOREIGN KEY (student_id) REFERENCES student(student_id) ON DELETE RESTRICT );

INSERT INTO course (course_name) VALUES ('Java Programming'); INSERT INTO course (course_name) VALUES ('J2EE Technology'); INSERT INTO course (course_name) VALUES ('Web Service');

Appendix B – Training Web Service Application Database Reference

2

INSERT INTO course (course_name) VALUES ('Advanced J2EE');

INSERT INTO student (student_name) VALUES ('Michael Zheng'); INSERT INTO student (student_name) VALUES ('Zhang San'); INSERT INTO student (student_name) VALUES (‘Li Si');

Appendix B – Training Web Service Application Database Reference

3


								
To top