Table of Contents

Running Ultra Search Middle-Tier Components on OSE (Oracle Servlet Engine) 

Overview

The Oracle Servlet Engine (OSE) is a Servlet 2.2 compliant engine that runs inside the Oracle database server. Oracle Servlet Engine (OSE) can be used to run the Ultra Search Administration Tool and the Ultra Search JSP Query Application in the Oracle9i Server. 

  Related Topics

To run the Ultra Search Middle-Tier Compoents on OSE, you must:

  1. perform installation procedures in Oracle9i Server. 
  2. Configure the Oracle HTTP Server mod_ose module.

The Oracle Servlet Engine (OSE) is not a web server. Therefore, you must use a web server in conjunction with OSE. OSE can work with the Oracle HTTP Server or with the Oracle9i database web listener.

If you want to use the Oracle9i database web listener, you must perform the installation step 1 through step 6. If you want to use the Oracle HTTP Server, perform step 2 through 7. For more information, refer to the Oracle Servlet Engine User's Guide.  

Conventions used in this document

  • The $ORACLE_HOME directory refers to the directory in which you have installed the Oracle9i server, the Ultra Search Server Component as well the the Ultra Search Middle-Tier Components.

  •  
  • The $HTTP_HOME directory refers to the Oracle Home directory in which you have installed the Oracle HTTP Server.

  •  
  • All commands that are to be entered in a standard unix shell start with a "%".

  •  
  • All commands that are to be entered in a session shell (a shell started with the sess_sh command) start with a "$".

Step 1: Setup Prerequisites 

  • Make sure that the ORACLE_HOME environment variable is set to the directory in which you have installed Oracle9i Server, the Ultra Search Server Component and the Ultra Search Middle-Tier Components.

  •  
  • Make sure that the PATH environment variable includes $ORACLE_HOME/bin.

  •  
  • Make sure the OSE library file libjip9.so is in $ORACLE_HOME/lib directory.

  •  
  • Make sure the database initial file init<sid>.ora parameter 'O7_DICTIONARY_ACCESSIBILITY' is 'TRUE'. Otherwise you will not be able to connect as SYS in following steps.

  •  
  • Make sure the following line is in the database initial file init<sid>.ora: 

  • mts_dispatchers = "(PROTOCOL=tcp)" 
     
  • Edit the property file "$ORACLE_HOME/ultrasearch/jsp/admin/config/database.properties" as follows: 

  • connection.driver=oracle.jdbc.driver.OracleDriver 
    connection.url=jdbc:oracle:thin:@<hostname>:<port_number>:<oracle_sid> 

Step 2: Configure OSE Webservice in Oracle9i database server

  • Login to a session shell from the Unix command line: 

  • % sess_sh -u sys/change_on_install -s jdbc:oracle:thin:@<hostname>:<port_number>:<oracle_sid> 
     
  • Create a web service 'usearchService': 

  • $ createwebservice -root /usearchRoot usearchService 
     
  • Select a HTTP port for the web listener.(We use 5555 in the example.)

  •  
  • Add a "main" endpoint for HTTP port 5555. 

  • $ addendpoint -port 5555 -timeout 300 -register usearchService main 
     
  • Add "mod_ose" endpoints for net8: 

  • $ addendpoint -net8 -timeout 300 usearchService mod_ose 
     
  • Create a web domain 

  • $ createwebdomain -docroot  $ORACLE_HOME/ultrasearch  /usearchRoot 
     
  • Create a servlet context for Ultra Search administration GUI: 

  • $ createcontext -virtualpath /ultrasearch/admin/* 
    -docroot $ORACLE_HOME/ultrasearch/jsp/admin  /usearchRoot usearchContext 
     
  • Create a servlet context for Ultra Search query sample JSP GUI: 

  • $ createcontext -virtualpath /ultrasearch/query/*
    -docroot $ORACLE_HOME/ultrasearch/sample  /usearchRoot  sampleContext 
     
  • Create a servlet context for Ultra Search query sample PSP GUI: 

  • $ createcontext -virtualpath /wksys
    -docroot $ORACLE_HOME/ultrasearch/sample  /usearchRoot  wksysContext 
     
  • Grant ownership of the web service to the user 'wksys': 

  • $ chown -R WKSYS /usearchRoot 
  • Exit from the session shell 

  • $ exit 
     
  • Bounce the database. 

Step 3: Load Ultra Search Java, JSP, and property files into the database

  • Login to SQL*Plus from $ORACLE_HOME/ultrasearch directory, connect to SYS schema and run the following script:

  • SQL> @admin/wk0midtier.sql <<$ORACLE_HOME>>/ultrasearch/lib <<$ORACLE_HOME>>/ultrasearch/lib <<$ORACLE_HOME>>/ultrasearch/jsp/admin/config 

    Note: Please replace <<$ORACLE_HOME>> with the full directory path.

Step 4: Publish Ultra Search JSP

  • Login to session shell from $ORACLE_HOME/ultrasearch/admin/ directory:

  • % sess_sh -u wksys/wksys -s jdbc:oracle:thin:@<hostname>:<port_number>:<oracle_sid> 
     
  • Run the script in the session shell: 

  • $ @wk0pubjsp.cmd 
     
  • Use the URL http://<hostname>:5555/ultrasearch/admin/control/login.jsp to test Ultra Search Administration GUI. 

Step 5: Install PL/SQL gateway servlet

  • In SQL*Plus, connect to SYS schema and run the script rdbms/admin/initplgs.sql to load the embedded PL/SQL gateway servlet into the database server.

  •  
  • Use Sesion Shell to publish the servlet:

  •  
    • In Unix command line, type: 

    • % sess_sh -u sys/change_on_install -s jdbc:oracle:thin:@<hostname>:<port_number>:<oracle_sid> 
       
    • In Session Shell, type: 

    • $ publishservlet -virtualpath pls/* /usearchRoot/contexts/usearchContext plsGateway SYS:oracle.plsql.web.PLSQLGatewayServlet 

Step 6: Configure a Database Access Descriptor(DAD) for Ultra Search user query GUI

  • Login to SQL*Plus from $ORACLE_HOME/ultrasearch, connect to SYS schema

  •  
  • Type the following command to create the DAD based on port number 5555:

  • SQL> @admin/wk0dad.sql 5555 WKSYS <Password_of_WKSYS_schema>

    Note: If there is any error due to the package dbms_epgc is not installed, please login to SQL*Plus with SYS schema and run the following .sql script: 

SQL> @$ORACLE_HOME/rdbms/admin/dbmsepgc.sql 
SQL> @$ORACLE_HOME/rdbms/admin/prvtepgc.plb
  • Use the URL http://<hostname>:5555/pls/wksys/wksys.gsearch to test Ultra Search user query screen. 

Step 7: Configure mod_ose in Oracle HTTP server

  • Put the following TNS entry in $TNS_ADMIN/tnsnames.ora file: 
inst1_http = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<hostname>)(PORT=<port_number>)) 
  (CONNECT_DATA=(SERVICE_NAME=<service_name>) 
    (SERVER=shared)(PRESENTATION=http://usearchService) 
  ) 
)
  • Make sure mod_ose library 'libjipa8i.so' is put under $HTTP_HOME/Apache/Apache/libexec/

  • Note: If the file doesn't exist, copy the file from $HTTP_HOME/Apache/modose/bin/ directory.
     
  • Copy the file $ORACLE_HOME/ultrasearch/jsp/admin/config/mod__ose.conf to $HTTP_HOME/Apache/modose/conf/ directory.

  •  
  • Make sure the file $HTTP_HOME/Apache/modose/conf/mod__ose.conf is included in oracle_apache.conf.

  •  
  • Make sure the file oracle_apache.conf is included in httpd.conf

  •  
  • Type the following command to create the DAD based on port number 7777:

  • SQL> @admin/wk0dad.sql 7777 WKSYS <Password_of_WKSYS_schema>
  • Restart the Oracle HTTP server.

  •  
  • Follow Step 4 and Step 5 in the section "Installing the Ultra Search Middle-Tier Components on web server hosts" to test the Ultra Search Administration Tool and JSP Query Application