Deploying the FAQ OC4J Application

This lesson shows you how to deploy the FAQ OC4J Application.

This module will discuss the following topics:

Overview
Prerequisites
Creating the FAQ User and Schema in Your Database
Selecting the Application Server Target to Deploy the FAQ Application
Adding your Data Source
Deploying the FAQ Application
Testing the FAQ Application

Place the cursor on this icon to display all screenshots. You can also place the cursor on each icon to see only the screenshot associated with it.

The FAQ Application will be used to show some of the capabilities of Grid Control. You will deploy the application in your Grid Control MidTier and store the data in your orcl database.

The FAQ application provides support for managing Frequently Asked Questions (FAQs) and storing/retrieving them from an Oracle database. FAQs are broadly categorized into Specialization Areas. Each Specialization Area is further sub-categorized into Topics. A FAQ can be associated with multiple Specialization Areas which in turn have multiple Topics associated with them.

FAQs are of two types - Internal (to be published for internal users only) and External (to be published on external forums). Internal FAQs will include all external FAQs + internal FAQs.

Areas, Topics and FAQs are entered or updated in the database via Input/Update screens or via a corresponding Web service interface. Each Area, Topic and FAQ is uniquely identified by a primary key which is automatically generated by the system.

You can generate a list of FAQs (in HTML format) for a given Specialization Area for internal or external publication.

Before starting this module, you should have:

1.

Reviewed and fulfilled the requirements in the PreInstallation Considerations section of the Oracle Enterprise Manager Grid Control Installation and Basic Configuration 10g Release 1 (10.1) Documentation.

 

2.

Complete the Installing Enterprise Manager 10g Grid Control Using a New Database lesson.

 

3.

Complete the Installing the Oracle Database 10g lesson.

 

4.

Complete the first three lessons in Installing the Application Server 10g.

 

5.

Complete the Deploying the Enterprise Manager 10g Linux Management Agent lesson on each host machine.

 

6.

Complete the Postinstallation Configuration lesson.

 

7.

Download the faq.zip file and unzip it into your working directory (i.e. /home/oracle/wkdir).

 

Before you deploy the FAQ application, you will need to create a database user and all the necessary tables. Perform the following steps:

1.

First you need to create a user. Open a terminal window and execute the following commands:

cd wkdir/faq/sql
sqlplus /nolog
connect / as sysdba
grant connect, resource to faquser identified by faquser;

Move your mouse over this icon to see the image

 

2.

Now, you connect as the user you just created and create the necessary tables. Run the following script:

connect faquser/faquser
@CreateTables
exit

Move your mouse over this icon to see the image

 

You may have numerous Application Servers for which to deploy your application. Perform the following steps:

1.

Open your browser and enter the following URL:

http://<gridhost>:<webcache port>/em

Login as your sysman and click Login.

Move your mouse over this icon to see the image

 

2.

Click the Targets tab.

Move your mouse over this icon to see the image

 

3.

Select the Application Servers subtab.

Move your mouse over this icon to see the image

 

4.

Select your Application Server that you want to deploy the FAQApp application on from the list.

Move your mouse over this icon to see the image

 

5.

Scroll down to the bottom of the window.

Move your mouse over this icon to see the image

 

6.

Under Related Links, select the Administer link.

Move your mouse over this icon to see the image

 

7.

Enter your <ias_admin password> as the password and click OK.

Move your mouse over this icon to see the image

 

You will modify the existing data source and change the connection information and user to the database where you just created the user and associated tables. Perform the following steps:

1.

Select the home OC4J Instance from the list of System Components.

Move your mouse over this icon to see the image

 

2.

Click the Administration tab.

Move your mouse over this icon to see the image

 

3.

Under Application Defaults, click Data Sources.

Move your mouse over this icon to see the image

 

4.

Click Edit.

Move your mouse over this icon to see the image

 

5.

Change the following under General:

JDBC URL: jdbc:oracle:thin@<hostname>:1521:<sid>

Change the following under Datasource Username and Password:

Username: faquser
Use Cleartext Password: faquser

Then scroll down to the bottom of the page.

Move your mouse over this icon to see the image

 

6.

Click Apply.

Move your mouse over this icon to see the image

 

7.

Your instance needs to be restarted. Click Yes.

Move your mouse over this icon to see the image

 

8.

Your instance is being restarted.

Move your mouse over this icon to see the image

 

9.

Once your instance has been restarted. Click OK.

Move your mouse over this icon to see the image

 

10.

Now you are ready to deploy the FAQ Application. Click the OC4J: home breadcrumb.

Move your mouse over this icon to see the image

 

To deploy the FAQ Application, perform the following steps:

1.

Click Deploy EAR file.

Move your mouse over this icon to see the image

 

2.

To select your EAR file, click the Browse button.

Move your mouse over this icon to see the image

 

3.

Select your EAR file from your working directory (i.e. /wkdir/faq/dist) and click OK. Enter FAQApp for the Application Name and click Continue.

Move your mouse over this icon to see the image

 

4.

Click Finish.

Move your mouse over this icon to see the image

 

5.

Click Deploy.

Move your mouse over this icon to see the image

 

6.

The FAQ application is being deployed.

 

7.

The deployment was successful. Click OK.

Move your mouse over this icon to see the image

 

8.

You see the FAQApp you just deployed in the list.

Move your mouse over this icon to see the image

 

To make sure the application was deployed successfully, you need to test the application. Perform the following steps:

1.

Open another browser window and enter the following URL:

http://<hostname>:<http server listener port>/FAQApp/

Enter faq/faq and click OK.

Move your mouse over this icon to see the image

 

2.

Under Specialization Areas, click Create a New Area.

Move your mouse over this icon to see the image

 

3.

Enter Enterprise Manager Grid Control 10g and click Save.

Move your mouse over this icon to see the image

 

4.

Your area has been created. Now you want to create a topic. Click Topic for Area tab.

Move your mouse over this icon to see the image

 

5.

Enter Installation for the Description and click Save.

Move your mouse over this icon to see the image

 

6.

Your topic has been created. Click Home tab.

Move your mouse over this icon to see the image

 

7.

Select Create a New FAQ.

Move your mouse over this icon to see the image

 

8.

Make sure the Area and Topic you just created are selected and enter the product version 10.1.0.2 and enter a Question and scroll down.

Move your mouse over this icon to see the image

 

9.

Enter an answer and click Save.

Move your mouse over this icon to see the image

 

10.

Your FAQ has been created. Click Home tab.

Move your mouse over this icon to see the image

 

11.

Select Generate List of FAQs link.

Move your mouse over this icon to see the image

 

12.

Select Internal/External for Search for: and click Submit.

Move your mouse over this icon to see the image

 

13.

Your List has been generated. The FAQ Application has been successfully deployed and tested.

Move your mouse over this icon to see the image

 

Place the cursor on this icon to hide all screenshots.