The last step in the development of the Persistence Example application is its deployment and testing. In this procedure you have to:
· Deploy the database tables
· Deploy the application EAR
· Run the application
· You must have entered the J2EE Engine settings.
To set up the J2EE Engine, go to Window → Preferences → SAP J2EE Engine. You can set either remote or local installation. The default message server port is 3601.
· You must have launched the J2EE Engine. For more information, see Starting and Stopping the SAP System.
...
1. Deploy the database tables
...
a. In the Dictionary perspective, open the context menu of the GettingStartedPersistenceDic project.
b. Choose Create Archive.
c. In the context menu of the project choose Deploy.
The tables are the same as the ones used in Getting Started with JDO. If you have already tried the JDO example, and have the tables deployed in the database, you can skip this step.
2. Deploy the application EAR:
a. In the J2EE Development perspective, extend the GettingStartedOpenSQLEar project node.
b. Open the context menu of GettingStartedOpenSQLEar.ear and choose Deploy to J2EE engine.
c. The application starts automatically after being deployed.
3. Test the application:
a. Invoke the application in your browser:
http://<yourhost>:<HTTP port>/<Context Root>/
http://localhost:50000/gettingstarted-sql/
b. Create a department:
i. Enter a Department ID – for example, 1.
ii. Choose New Department and enter a name.
iii. Choose either SQLJ or JDBC.
iv. Choose Submit.
c. Create an employee:
i. Enter the ID of the department you have created.
ii. Choose New Employee and enter the required data.
iii. Choose either SQLJ or JDBC.
iv. Choose Submit.
d. List all employees in a department.
i. Enter the ID of an existing department.
ii. Choose List Employees.
iii. Choose either SQLJ or JDBC.
iv. Choose Submit.