Skip Headers

Oracle9i Application Server Release Notes
Release 2 (9.0.3) for AIX-Based Systems, hp HP-UX PA-RISC (64-bit), hp Tru64 UNIX, and Linux x86
Part No. B10227-11
  Go To Documentation Library
Core
Go To Product List
Platform
Go To Table Of Contents
Contents

Previous Next  

5 Management and Security

This chapter describes management and security issues associated with Oracle9iAS. It covers the following topics:

5.1 Deployment Issues

This section covers the following deployment issues:

5.1.1 Deploying Applications to OC4J When Default User Manager is Principal

Each OC4J instance has a global application called default that is the parent application of all applications deployed to the instance. This will use jazn-xml as the user manager by default.

If the user manager for this application is changed to principals, and you attempt to deploy an application using Oracle Enterprise Manager, the deployment fails when changes are made on the Select User Manager page.

Thus, if the user manager for the default application of an OC4J instance is changed to principals, for future application deployments using Oracle Enterprise Manager, you should not visit the Select User Manager page in the wizard. The application will be deployed successfully with principals as its user manager. However, the summary screen of the Deployment wizard will show jazn-xml as the user manager. Any changes you wish to make to the application's user manager can then be completed by navigating to the Application Properties page.

5.1.2 Using Port Option to Configure Loading Application

There are several approaches to configure how to load an application:

  • Load the application dynamically when the first request comes in. This approach uses named pipes for communication.

  • Load the application at startup. With this approach, you can configure the application to use the port option or the named pipe option, where you do not have to specify the port. This release supports the port option only.

5.2 DCM Issues

This section covers the following Distributed Configuration Management (DCM) utility issues:

5.2.1 Running dcmctl to Update Configuration for Manual Changes

If you make manual changes to the configuration files for the following components:

  • Oracle HTTP Server

  • OC4J

The changes will not be reflected in the DCM repository.

To propagate your manual edits back to the DCM repository, run the following commands after making any edits, either manually or through the Oracle Enterprise Manager.

prompt> ORACLE_HOME/dcm/bin/dcmctl updateconfig -ct ohs
prompt> ORACLE_HOME/dcm/bin/dcmctl updateconfig -ct oc4j

This is also the case if you created, modified, or deleted Database Access Descriptors (DADs) or modified the mod_plsql cache setting using the Oracle Enterprise Manager.

See Oracle9i Application Server Administrator's Guide for details.

5.2.2 Concurrent Administrative Operations on a Cluster Not Supported

Concurrent administrative operations on a cluster are not supported in Oracle9iAS. Configuration information for clusters is stored in a central repository. All members of the cluster have access to this repository. This keeps the configuration consistent across the cluster. Since the objects in the repository are shared across the cluster, concurrent write access to these objects is not allowed.

5.2.3 Restarting OC4J Instance After Using the dcmctl updateConfig Command

If you synchronize the configuration with the infrastructure database using the following command:

prompt> ORACLE_HOME/dcm/bin/dcmctl updateConfig -ct oc4j

then you must restart the OC4J instance using the following command:

prompt> ORACLE_HOME/dcm/bin/dcmctl restart -ct oc4j -co home

If you do not restart the OC4J instance after synchronizing the configuration, you will see the following error when you deploy an application using dcmctl:

ADMN-300075
Nested exception
Base Exception:
java.rmi.RemoteException:Error looking up cmt-datasource at jdbc/OracleDS
(name not found)

5.2.4 Shutdown Enterprise Management Web Site Before Restoring Instances

You should not restore instances while Oracle9iAS Enterprise Manager Web site is running. Use the following procedures to restore instances appropriately:

  1. Stop Oracle9iAS Enterprise Manager Web site with the following command:

    prompt> ORACLE_HOME/bin/emctl stop
    
    
  2. Restore instances with the following command:

    prompt> ORACLE_HOME/dcm/bin/dcmctl restoreinstance
    
    
  3. Resynchronize instances with the following command:

    prompt> ORACLE_HOME/dcm/bin/dcmctl resyncinstance
    
    

    If you issue the dcmctl restorinstance command while Oracle9iAS Enterprise Manager Web site is running, you may encounter the following errors

    • Your dcmctl restorinstance command may execute successfully, however, components of the instances may be unsynchronized. When you resynchronize these instances with the dcmctl resyncinstance command, you may receive the following error message:

    • Your dcmctl restorinstance command may execute successfully, and components of the instances appear to be synchronized. However, when you start the instances, you may receive the following error message:

           ADMN-705006 
      TaskMaster is using Oracle Notification Service (ONS) to do broadcasting. 
      There is an error in the broadcasting.
      Base Exception: 
      java.lang.NullPointerException:null
      Debug the corresponding problem in ONS.
      TaskMaster Broadcasting had an exception.
      Root Cause: null
      java.lang.NullPointerException 
         at oracle.ias.sysmgmt.task.TaskMasterReceiver.handle(TaskMasterReceiver.
      java:217)
         at oracle.ias.sysmgmt.task.TaskMaster.internal_evaluate(TaskMaster.java:
      1279)
         at
      oracle.ias.sysmgmt.task.RemoteEvaluate.execCommand(RemoteEvaluate.java:25)
         at oracle.ias.sysmgmt.task.DaemonWorker.run(DaemonWorker.java:79)
      
      

      As a workaround, if you have restored instances while Oracle9iAS Enterprise Manager Web site is running, you must manually shutdown all Oracle processes associated with the instances, then restart the instances.

5.3 OPMN Issues

This section covers the following Oracle Process Management Notification (OPMN) issues:

5.3.1 OPMN Cannot Start OC4J Instance with Multibyte

The configuration file for OPMN, opmn.xml, is in UTF-8 encoding. The code that parses opmn.xml is written in C, and the data in opmn.xml is handled as UTF-8 bytes. This causes problems when the data is not converted to the right encoding. For example, if the default encoding of the operating system is EUC-JP, the directory is created using UTF-8 data. The multibyte instance name then becomes inaccessible.

As a workaround, avoid using multibyte characters for contents such as instance names and environment variables in opmn.xml.

5.3.2 opmnctl restart Command Displaying Unavailable Hostname Messages

If you run the opmnctl restart command or restart OC4J by other means, and the Oracle9iAS Enterprise Manager Web site is running, you might see the following error messages in the

ORACLE_HOME/Apache/Apache/error_log
[Wed Apr  3 12:09:50 2002] [error] MOD_OC4J_0082: Failed to call
gethostbyname() for host name: UNAVAILABLE.
[Wed Apr  3 12:09:50 2002] [error] MOD_OC4J_0019: Failed to resolve network
address of worker: home_15's host: UNAVAILABLE and port: 3003.
[Wed Apr  3 12:09:50 2002] [error] [client 130.35.92.190] MOD_OC4J_0138:
Failed tovalidate network worker: home_15 with host: UNAVAILABLE and port:
3003.
[Wed Apr  3 12:09:50 2002] [error] [client 130.35.92.190] MOD_OC4J_0141:
Failed to validate host: UNAVAILABLE and port 3003 for network worker:
home_15.

You can ignore these error messages.

5.3.3 opmnctl stopproc Command Not Responding

If you use the opmnctl stopproc command to stop a process that was already killed or abnormally terminated, the opmnctl stopproc command might not respond. This may prevent you from using other process-related commands.

In this situation, use the following commands:

prompt> ORACLE_HOME/opmn/bin/opmnctl reload
prompt> ORACLE_HOME/opmn/bin/opmnctl stopproc

If you are using dcmctl, then the dcmctl stop command will fail. Use the following commands to resolve the situation:

prompt> ORACLE_HOME/dcm/bin/dcmctl updateconfig -ct opmn
prompt> ORACLE_HOME/dcm/bin/dcmctl stop

5.4 Oracle Enterprise Manager Issues

This section covers the following Oracle Enterprise Manager issues:

5.4.1 Log in Problems Associated with Secondary Instance

You cannot log in to the Oracle Enterprise Manager of a secondary instance after the instance is made active during deinstall of the first instance. As a workaround, perform the following steps:

  1. After deinstalling the first instance and making the second instance Oracle Enterprise Manager active, change to $ORACLE_HOME/bin and run the following command with a password:

    prompt> emctl set password...
    
    
  2. You cannot access Oracle Enterprise Manager using the new password until you restart emctl. In addition, emctl stop will not work as the password will not be accepted. When you issue emctl start directly, assuming the Oracle Enterprise Manager service is running, the following option appears:

    An instance of EMD is already running. Do you want to shut it down first [Y or N]
    

    Select Y and click Enter.

    The status shows the following:

    Waiting for EM to initialize... Started.
    

  3. Access the Oracle Enterprise Manager Web site using the new password.


    Note:

    Use this workaround before any subsequent install on the same host

5.4.2 Oracle Enterprise Manager Web Site Log Files Too Large

With the default logging level, some of the Oracle Enterprise Manager Web site log files become very large.

As a workaround, edit the logging properties configuration file and increase the logging level used by the Oracle Enterprise Manager software. The logging level can be set to INFO, WARN, or ERROR. When it is set to INFO, all informational messages are saved in the log files. When it is set to WARN, all warning messages are saved to the file. To reduce the amount of disk space required by the log files, do the following:

  1. Edit the logging.properties file, which is located in

    ORACLE_HOME/sysman/config/logging.properties
    
    
  2. Change all occurrences of INFO and WARN to ERROR.

  3. Save the file and restart the Oracle Enterprise Manager middle tier Web site.


    See Also:

    Oracle9i Application Server Administrator's Guide for information about restarting Oracle Enterprise Manager.

5.4.3 Metrics and Rollup Data Invisible on Oracle9iAS Home Page

When you log on to the Oracle9iAS home page on host xyz.oracle.com, you may not see the rollup data. In addition, you may not see metrics on the Oracle HTTP Server and OC4J instance pages.

As a workaround, edit targets.xml and set all instances of hostname xyz to the complete host and domain name, such as xyz.oracle.com. The metrics and rollup data should be visible once you restart the Enterprise Management Web site.

5.4.4 Using emctl to Change the ias_admin Password

If you change the ias_admin password using emctl, then you must restart the Oracle Enterprise Manager Web site with the following commands:

prompt> ORACLE_HOME/bin/emctl stop
prompt> ORACLE_HOME/bin/emctl start

5.4.5 OC4J Metrics Not Displayed in the Home Page

When the Oracle Enterprise Manager Home Page is opened, the OC4J metrics are not displayed. As a workaround, refresh the page to see the metrics.

5.4.6 Changing the ias_admin Password in Translated Versions of the Web Site

You cannot change the ias_admin password using a translated version of the Oracle Enterprise Manager Web site. This is because the Preferences link on the Instance Home Page is disabled.

You can change the ias_admin password using the following command:

prompt> ORACLE_HOME/bin/emctl set password new_password

5.4.7 Oracle Enterprise Manager Not Supporting Multiple Locales

Oracle Enterprise Manager does not support multiple locales. The following components use the browser's locale when displaying pages in Oracle Enterprise Manager:

  • Oracle9iAS Discoverer

  • Oracle9iAS Forms Services

  • Oracle9iAS Portal

  • Oracle9iAS Single Sign-On

  • PL/SQL properties

  • Oracle9iAS Unified Messaging

5.4.8 Deploying BC4J JSP, UIX JSP and UIX XML Applications

BC4J JSP, UIX JSP, and UIX XML applications from JDeveloper deployed to Oracle9iAS through the Oracle Enterprise Manager deployment functionality runtime will result in a runtime rendering data access error. This happens only if data source information is added subsequently through Oracle Enterprise Manager and not pre-packaged in the EAR file from JDeveloper.

If the EAR file generated from JDeveloper does not package the data source information or the Deploy to EAR Files option is chosen instead of Deploy to Connection, and if that information is subsequently added through the Oracle Enterprise Manager through the edit data sources functionality, then the UIX JSP and UIX XML applications cannot run successfully due to runtime rendering error.

To avoid the error, do not add the data sources information after deployment through Oracle Enterprise Manager. Instead, package the EAR file with the data sources information from JDeveloper prior to deployment through Oracle Enterprise Manager. While creating the UIX JSP or the UIX XML application from JDeveloper, instead of deploying it to an EAR file, deploy it to any existing connection, including dummy connections. That process will create an EAR file with the data sources information packaged.

If deploying to a dummy connection, although the process will result in deployment errors in JDeveloper, it will create an EAR file that includes the data source information that can be successfully deployed to Oracle9iAS.

5.4.9 Configuring JAAS with Oracle Enterprise Manager Web Site

To configure JAAS, perform the following tasks:

  1. Open the ORACLE_HOME/sysman/j2ee/config/jazn.xml in a text editor.

  2. Uncomment the following properties in the jazn.xml file:

    <property name="ldap.service" value="ldap://localhost:389"/>
    <property name="ldap.user" value="cn=oracladmin"/>
    <property name="policymgr.provider" value="LDAP"/>
    
    

    If localhost does not work in your environment, replace it with the actual name of your Oracle Internet Directory server. Similarly, replace the port number if your Oracle Internet Directory server does not use the default port of 389.

  3. Modify the ldap.password property by entering the password you used for Oracle Internet Directory server login. Be sure to include an exclamation point (!) before the password to encrypt it. For example:

    <property name="ldap.password" value="!manager1234"/>
    
    
  4. Save the modified jazn.xml file and restart the Oracle Enterprise Manager Web site.


    Note:

    By default, the Oracle Internet Directory server will recognize your ias_admin password. If you later change this password for Oracle Internet Directory administration, you must re-enter it using the ldap.password property in the jazn.xml file, and then restart the Oracle Enterprise Manager Web site in order to manage JAAS using Oracle Internet Directory.

5.4.10 Intelligent Agent May Not Work in Non-English Environment

If the language environment is non-English, and the /usr/local/lib/tcl8.2/encoding/*.enc Tcl interpreter encoding definition files are installed on the node, Oracle Enterprise Manager Intelligent Agent may not work properly with non-English characters. As a result, Oracle Enterprise Manager jobs may fail to execute or may return corrupted strings. If the above encoding definition files are not present, this problem should not occur.

The solution to this problem is to create empty Tcl interpreter encoding definition files at the following location:

ORACLE_HOME/lib/tc18.2/encoding/*.enc

To achieve this solution, perform the following steps:

  1. Execute the following commands:

    prompt> cd ORACLE_HOME/lib
    prompt> mkdir tcl8.2
    prompt> cp -pr /usr/local/lib/tcl8.2/encoding tcl8.2
    prompt> cd tcl8.2/encoding
    
    
  2. Execute the following commands depending on which shell you are running:

    • If you are using C-shell or T C-shell:

      prompt> foreach file (*.enc)
      prompt> cp /dev/null $file
      prompt> end
      
      
    • If you are using Korn-shell or B-shell:

      prompt> for file in *.enc; do
      prompt> cp /dev/null $file
      prompt> done
      
      
  3. Once the empty encoding definition files have been created, restart Oracle Intelligent Agent as follows:

    prompt> agentctl stop
    prompt> agentctl start
    
    

    Note:

    The NLS_LANG and LANG environment variables must be defined with appropriate values before Oracle Intelligent Agent is restarted.

5.4.11 Oracle9iAS 9.0.3 and Oracle9iAS 9.0.2x Instances Incompatible for Clustering

You cannot add an Oracle9iAS 9.0.3 instance to an empty Oracle9iAS 9.0.3 cluster from an Oracle9iAS 9.0.2 Oracle Enterprise Manager. It is necessary to prevent Oracle9iAS 9.0.2x instances and Oracle9iAS 9.0.3 instances from being clustered together due to incompatibility of J2EE versions. Oracle9iAS 9.0.3 includes a special installed component type, which is unrecognizable to Oracle9iAS 9.0.2 Oracle Enterprise Manager. This special installed component type would not allow you to join a different instance type. A check is performed only when you are joining an empty cluster. If a cluster already contains instances, it only takes instances that are of the same type as those in the cluster.

Therefore, when adding an Oracle9iAS 9.0.3 instance to an empty cluster, you must go to the Oracle9iAS 9.0.3 instance and use either the dcmctl command or Oracle Enterprise Manager user interface for Oracle9iAS 9.0.3.

5.4.12 Oracle9iAS Enterprise Manager Web Site Not Started

If you have Installed Oracle9iAS Release 2 (9.0.2x) J2EE & Web Cache, and stopped the Oracle9iAS Enterprise Manager Web site, when you install Oracle9iAS Release 2 (9.0.3) on the same machine, but in a different Oracle Home directory, the Oracle9iAS Enterprise Manager Web site will not start, by default.

As a workaround, you must launch the Oracle9iAS Enterprise Manager Web site with the following command:

prompt> ORACLE_HOME/bin/emctl start

5.5 Globalization Issues

This section covers the following other globalization issues:

5.5.1 Microsoft Internet Explorer Failing in Chinese Environment on DAS

Using Microsoft Internet Explorer 5.5 in a Simplified Chinese environment on DAS, you are unable to edit/delete Attribute on the Configure User Attribute page. For example:

  1. Log in to http://hostname:port/oiddas/

  2. Click the Configuration tab, then the User Entry tab.

  3. Go to the second step Configure User Attribute.

  4. Choose Next, Edit, or Delete. On this page, you cannot access the corresponding page, but stay in this page. The browser status bar displays Error on Page.

As a workaround, use Netscape 4.7 to access the DAS component in a simplified Chinese environment.

5.5.2 Japanese Help Modules Displaying Incorrectly

Japanese text is not readable when running in a Japanese environment. This affects three help modules:

  • OID Server Manageability

  • Discoverer Oracle Enterprise Manager help system

  • BC4J Help

As a workaround, use the following procedures.

For Oracle Internet Directory Server Manageability:

  1. Extract the file:

    prompt> jar xvf ORACLE_HOME/sysman/webapps/emd/online_help/oidsm/oidsm_help_ja.jar oidsm.hs
    
    
    
  2. Using a text editor, ensure the character set in the following line is specified as Shift_JIS in the oidsm.hs file:

    <xml version='1.0' encoding="Shift_JIS">
  3. Convert oidsm.hs from the EUC format to the SJIS format.

  4. Replace the existing oidsm.hs file with the fixed file:

    prompt> jar uvf ORACLE_HOME/sysman/webapps/emd/online_help/oidsm/oidsm_help_ja.jar oidsm.hs
    
    
    

For Discoverer Oracle Enterprise Manager Help System:

  1. Extract the following files to fix:

    prompt> jar xvf ORACLE_HOME/sysman/webapps/emd/online_help/disco/disco_help_ja.jar disco.hs prompt> jar xvf ORACLE_HOME/sysman/webapps/emd/online_help/disco/disco_help_ja.jar toc.xml
  2. Using a text editor, ensure the character set in the line below is specified as Shift_JIS in the above two files:

    <xml version='1.0' encoding="Shift_JIS">
  3. Convert disco.hs and toc.xml from the unicode format to the SJIS format.

  4. Replace the existing files with the fixed files:

    prompt> jar uvf ORACLE_HOME/sysman/webapps/emd/online_help/disco/disco_help_ja.jar disco.hs
    prompt> jar uvf ORACLE_HOME/sysman/webapps/emd/online_help/disco/disco_help_ja.jar toc.xml
    
    
    
  5. In a similar fashion, extract all nine HTML files from the .jar file, and add the following line to each file, within the <head> section:

    <meta http-equiv=content-type content="text/html; charset=Shift_JIS">
  6. Then replace the files.

For BC4J:

  1. Extract the following file to fix:

    prompt> jar xvf ORACLE_HOME/sysman/webapps/emd/online_help/bc4j/bc4j_help_ja.jar bc4j.hs
    
    
  2. Delete the following lines from the file:

    <view>
       <label>contents</label>
       <type>oracle.help.navigator.tocNavigator.TOCNavigator</type>
       <data engine="oracle.help.engine.XMLTOCEngine">toc.xml</data>
    </view>
    
    
  3. Replace the existing file with the fixed file:

    prompt> jar uvf ORACLE_HOME/sysman/webapps/emd/online_help/bc4j/bc4j_help_ja.jar bc4j.hs
    
    

5.5.3 Japanese Language Version Missing Graphic Files

For the Japanese language version only, certain graphic (.gif) files are missing from:

ORACLE_HOME/classes/oracle/sysman/help/detailpanels_ja

As a workaround, copy the .gif files from the:

ORACLE_HOME/classes/oracle/sysman/help/detailpanels

directory (English files). If you are using the Oracle Enterprise Manager Web site, you should also copy the .gif files from ORACLE_HOME into:

ORACLE_HOME/oem_webstage/oracle/sysman/help/detailpanels_ja

Also, some Japanese files are installed into the wrong directory. Under:

ORACLE_HOME/classes/oracle/sysman/help/detailpanels_ja
ORACLE_HOME/oem_webstage/oracle/sysman/help/detailpanels_ja

the following files are installed into platform-specific subdirectories:

  • dv_advque.htm

  • dv_dguard.htm

  • dv_inst.htm

  • dv_logm.htm

  • dv_olap.htm

  • dv_schm.htm

  • dv_secu.htm

  • dv_stg.htm

    The files are located under the /euc for solaris subdirectory.

As a workaround, copy the files for your platform from the subdirectory into:

/detailpanels_ja

5.5.4 Several Language Help Files Missing

Language help files are missing for Oracle HTTP Server, OC4J, and Oracle9iAS Management Pages. Instead of Japanese files, English help files are included in the following online help JAR files:

ORACLE_HOME/sysman/webapps/emd/online_help/apch/apch_help_ja.jar
ORACLE_HOME/sysman/webapps/emd/online_help/oc_4j/oc_4j_help_ja.jar
ORACLE_HOME/sysman/webapps/emd/online_help/iastop/iastop_help_ja.jar

5.6 Other Management Issues

This section covers the following other management issues:

5.6.1 Clock Synchronization

Several Oracle9iAS components require the clocks on the machines on which they run to be synchronized. You can synchronize the clocks by running the Network Time Protocol (NTP) daemon on these machines. You do this with starting xntpd or a similar daemon processing abouttime or similar software for Windows.

5.6.2 Additional Information for Oracle9iAS Backup and Recovery

Additional information regarding Oracle9iAS backup and recovery is available from the white paper "Oracle9iAS Web Cache: Backup and Recovery".

There is also an associated Oracle9iAS Backup and Recovery tool. The tool requires Oracle9iAS Release 2 (9.0.2.1.0) or later.

The white paper and tool can be found at Oracle Technology Network:

http://otn.oracle.com/products/ias/hi_av/content.html

5.7 Security Issues

This section covers the following security issues:

5.7.1 Disabling Demonstration Pages in Production Systems

The demonstration pages for J2EE and Web Cache, located in http://host.domain:port/J2EE.htm are vulnerable. You must disable the all demonstration pages when exhibiting a site in order to ensure security.

The following URLs indicate some demonstration pages that are vulnerable.

Oracle HTTP Server

http://host.domain:port/cgi-bin/printenv?<script>alert(document.cookie)</script>
http://host.domain:port/perl/printenv?<script>alert(document.cookie)</script>
http://host.domain:port/fcgi-bin/echo?<script>alert(document.cookie)</script>

OJSP Sample

http://host.domain:port/ojspdemos/basic/hellouser/hellouser.jsp
http://host.domain:port/ojspdemos/basic/simple/welcomeuser.jsp
http://host.domain:port/ojspdemos/basic/simple/usebean.jsp

JSP Sample

http://host.domain:port/j2ee/examples/jsp/snp/snoop.jsp?<script>alert(document.cookie)</script>
http://host.domain:port/j2ee/examples/jsp/cal/login.html

Servlet Sample

http://host.domain:port/j2ee/servlet/RequestParamExample
http://host.domain:port/j2ee/servlet/CookieExample
http://host.domain:port/j2ee/servlet/SessionExample
http://host.domain:port/j2ee/servlet/SnoopServlet?<script>alert(document.cookie)</script>

5.7.2 IASOBF and Oracle9iAS Single Sign-On Wallet Support User-dependent

To run the Oracle HTTP Server with SSL server correctly after installation in Oracle9iAS, you should create a wallet and have the certificates contained within it signed by the proper Certificate Authorities. Make sure that the SSLWallet directive in httpd.conf points to this new wallet rather than the default wallet provided by the installation. Oracle HTTP Server does not start unless you do one of the following:

  • Obfuscate the password for this new wallet by running:

    iasobf -p password rootosslpassword -p password LocalSystem
    
    

    and place this obfuscated password in the httpd.conf file using the Wallet Password directive, for example WalletPassword obfuscatedPassword. You can always put the wallet password in httpd.conf in clear text but this is not recommended by Oracle.

  • Make this new wallet an Oracle9iAS Single Sign-On wallet as the root user.


    See Also:

    Oracle9i Application Server Security Guide

5.8 Directing Requests to OC4J Instances in Different Oracle Homes

This section covers the following issues regarding directing requests to OC4J instances:

5.8.1 Overview

This section describes how to direct requests to OC4J instances running on ORACLE_HOME directories that are different from the one that first received the request. In other words, Oracle HTTP Server receives a request, then forwards it to an OC4J instance that belongs to a different ORACLE_HOME directory. In that ORACLE_HOME, OC4J instances are running, but Oracle HTTP Server may or may not be running. The ORACLE_HOME directories can be installed on the same or different machines.

This scenario is different from clusters. In a cluster, all the Oracle9iAS instances are configured identically, and mod_oc4j sends requests to the instances in the cluster in a round-robin fashion. See the "Application Server Clustering" chapter in the Oracle9i Application Server Administrator's Guide for details on clustering.

In this scenario, the Oracle9iAS instances do not need to be the same type. They can be different middle tier types and they can be configured differently. You can even direct requests between an infrastructure and a middle tier type.

5.8.2 Requirements

Your environment must have the following characteristics:

  • The ORACLE_HOME directories must belong to the same farm, using the same metadata repository, unless users make OPMN connections manually using the dcmctl addOPMNLink command.


    See Also:

    The Oracle9i Application Server mod_oc4j Functional Overview white paper on OTN at
    http://otn.oracle.com/products/ias/ohs/content.html
    

  • The targeted ORACLE_HOME directory must have the desired OC4J instances and the OC4J instance must be running.

  • The application must be deployed on the OC4J instance to which you want to route the request. In addition, the application must have the same URL prefix as on the local instance.

  • The middle tier may be clustered with other identically configured middle tier installations.

5.8.3 General Procedure

The procedure for directing requests to another ORACLE_HOME directory is to edit the Oc4jMount directive in the ORACLE_HOME/Apache/Apache/conf/mod_oc4j.conf file. The directive maps URLs to OC4J instances.

By default, the directive directs requests to OC4J instances in the local Oracle home (the OC4J instances belong to the same host:port specified in the URL).

For example, the following lines route requests that begin with /webapp/webapp to the home OC4J instance on the local Oracle9iAS instance:

Oc4jMount /webapp/* home

To direct requests to an OC4J instance on another ORACLE_HOME directory, you prepend the name of the Oracle9iAS instance to the OC4J instance name, and you use the keyword instance.

Syntax:

Oc4jMount url instance://ias_instance_name1:oc4j_instance_name [, ias_instance_name2:oc4j_instance_name, ...]

Oc4jMount url cluster://cluster_name1:oc4j_instance_name [, cluster_name2:oc4j_instance_name, ...]

where:

  • instance is a keyword.

  • cluster is a keyword.

  • url specifies the URL for the application.

  • ias_instance_nameN specifies the names of Oracle9iAS instances. These instances can run on the same machine or different machines. The instance name includes the machine name. See Section 5.8.6, "Determining Oracle9iAS Instance Names" for details.

    If you specify more than one instance name, the requests are sent to the instances in a round-robin manner.

  • cluster_nameN specifies the names of the clusters to which you want to direct the requests. Oracle HTTP Server distributes the requests to the Oracle9iAS instances in the cluster. See Section 5.8.8, "Determining Cluster Names" for details.

    For clustering details, see the "Application Server Clustering" chapter in the Oracle9i Application Server Administrator's Guide.

  • oc4j_instance_name specifies the name of the OC4J instance name on the Oracle9iAS instance. See Section 5.8.7, "Determining OC4J Instance Names" for details.

5.8.4 Non-Clustered Example

The following lines direct the requests to instances on an Oracle9iAS instance called pw.machine2.us.oracle.com. The instance is running on a machine called machine2.us.oracle.com.

Oc4jMount /webapp/* instance://pw.machine2.us.oracle.com:home

The syntax allows you to specify more than one instance to which to direct the requests. You separate the instances with the comma character. For example, the following line directs /foo/* requests to the OC4J_Foo instance running on machine2 and machine3 (all on one line):

Oc4jMount /foo/* instance://pw.machine2.us.oracle.com:OC4J_Foo,
pw.machine3.us.oracle.com:OC4J_Foo

In the above example, the pw.machine2.us.oracle.com and the pw.machine3.us.oracle.com Oracle9iAS instances do not need to be the same install type, but they do need to be running the OC4J_Foo instance.

5.8.5 Clustered Example

The syntax also allows you to direct requests to clusters. Oracle HTTP Server distributes the requests to the Oracle9iAS instances in the cluster.

The following example directs requests to OC4J_Foo instances in Oracle9iAS instances in the foo_cluster cluster.

Oc4jMount /foo/* cluster://foo_cluster:OC4J_Foo

5.8.6 Determining Oracle9iAS Instance Names

You can determine the name of an Oracle9iAS instance by running the dcmctl command with the whichInstance option:

prompt> ORACLE_HOME/dcm/bin/dcmct1 whichInstance
doctest_j2ee.machine1.us.oracle.com

The instance name contains the host name, including the domain name.

If you have multiple ORACLE_HOME directories on the same machine, run the command from the appropriate ORACLE_HOME.

For example, to route requests from the middle tier to infrastructure OC4J instances (scenario 2), you need the name of the infrastructure instance.

prompt> INFRASTRUCTURE_ORACLE_HOME/dcm/bin/dcmctl whichInstance
doctest_infra.machine1.us.oracle.com

5.8.7 Determining OC4J Instance Names

You can determine the names of installed OC4J instances on a machine by running the dcmctl command with the listComponents option on that machine:

prompt> ORACLE_HOME/dcm/bin/dcmctl listComponents
HTTP Server
home

The command returns the names of Oracle HTTP Server instances as well. You can determine the type of a component by running the dcmctl command with the getComponentType option:

prompt> ORACLE_HOME/dcm/bin/dcmctl getComponentType -co home
oc4j
prompt> ORACLE_HOME/dcm/bin/dcmctl getComponentType -co "HTTP Server"
ohs

To route requests from the middle tier to the infrastructure OC4J instances (scenario 2), you need the OC4J_DAS instance on the infrastructure.

5.8.8 Determining Cluster Names

You can determine the names of clusters by running the dcmctl command with the listClusters option.

prompt> ORACLE_HOME/dcm/bin/dcmctl listClusters
foo_cluster

5.8.9 Editing the mod_oc4j.conf File

You can edit the ORACLE_HOME/Apache/Apache/conf/mod_oc4j.conf file using a text editor or Oracle Enterprise Manager.


Note:

If you use a text editor to edit mod_oc4j.conf, you must run dcmctl with the updateConfig option to synchronize the changes with the DCM repository. Then you must restart Oracle HTTP Server so that it can read the updated file.

To edit the mod_oc4j.conf file using Oracle Enterprise Manager:

  1. Navigate to the Oracle Enterprise Manager Web site:

    http://host:1810/
    
    

    where host specifies the machine running Oracle Enterprise Manager. The default port is 1810.

  2. On the Farm page, click the name of the middle tier instance.

  3. On the middle tier instance home page, click HTTP Server in the System Components table.

  4. On the HTTP Server page, click Advanced Server Properties in the Administration section.

  5. On the Advanced Server Properties page, click mod_oc4j.conf.

    This displays the Edit mod_oc4j.conf page.

  6. Make your changes to the file.

  7. Click Apply.

  8. Click Yes when prompted to restart HTTP Server.

To edit the mod_oc4j.conf file using a text editor:

  1. Go to the ORACLE_HOME/Apache/Apache/conf directory.

    prompt> cd ORACLE_HOME/Apache/Apache/conf
    
    
  2. Make your changes to the file using a text editor

  3. Run dcmctl with the updateConfig parameter.

    prompt> ORACLE_HOME/dcm/bin/dcmctl updateConfig
    
    
  4. Restart the Oracle HTTP Server.

    prompt> ORACLE_HOME/dcm/bin/dcmctl restart -ct ohsprompt>