Oracle9iAS Wireless Getting Started and System Guide Release 2 (9.0.2) Part Number A90486-02 |
|
This chapter discusses Oracle9iAS Wireless load balancing and failover and includes the following sections:
Oracle9iAS Wireless offers a scalable, reliable server infrastructure through clustering and high availability. The clustering structure includes the following two features.
Each Wireless server process which runs on a single Java Virtual Machine (JVM) is referred to as a node. One or more nodes comprise an island. Nodes within an island are capable of serving the same applications, because the session for each client is replicated among all the nodes within an island in preparation of failover. One or more islands together form an OC4J (Oracle Containers for Java) instance for the purpose of load balancing. The entire OC4J instance is linked by mod_oc4j to a simple front-end, Oracle Http Server (OHS). Typically, an island has two to four nodes.
By default, the requests from the same client are always redirected to the same Wireless server process. If one process goes down, then the fault tolerance feature is supported for both stateful and stateless requests as follows:
This section describes how to configure the Oracle Http Server (OHS), Oracle Process Management and Notification (OPMN), and Oracle Containers for Java (OC4J).
The configuration file for OHS is httpd.conf, which includes mod_oc4j.conf, located in $ORACLE_HOME/Apache/Apache/conf/ directory. The mounting point from HTTP request to the Wireless server clustering instance is specified in mod_oc4j.conf as follows:
LoadModule oc4j_module libexec/mod_oc4j.so <IfModule mod_oc4j.c> Oc4jMount /ptg OC4J_Wireless Oc4jMount /ptg/* OC4J_Wireless Oc4jMount /modules OC4J_Wireless Oc4jMount /modules/* OC4J_Wireless </IfModule>
When installing the Wireless server from Oracle Universal Installer (OUI), these lines should be automatically populated in mod_oc4j.conf file.
The major configuration file for OPMN is opmn.xml, located in $ORACLE_HOME/opmn/conf/directory.
The oc4J oc4jInstanceID
in opmn.xml should be the exactly same as it appears in the mounting specification of the mod_oc4j.conf. The number of islands, the number of processes, and the other configuration parameters are also defined within opmn.xml. A sample configuration is as follows:
<oc4j oc4jInstanceID="OC4J_Wireless" gid="OC4J_Wireless"> <config-file path="$ORACLE_HOME/j2ee/OC4J_Wireless/config/server.xml" /> <base-port ajp="0", jms="2402", rmi="2502" /> <island id="OC4J_WirelessIslandA" numProcs="2" /> <island id="OC4J_WirelessIslandB" numProcs="3" /> </oc4j>
For this OC4J_Wireless cluster, two islands (OC4J_WirelessIslandA
and OC4J_WirelessIslandB
) share the request workload. OC4J_WirelessIslandA
is comprised of two wireless server processes while OC4J_WirelessIslandB
is comprised of three Wireless server processes. Altogether, five ports are needed for each type of protocol. The port number range is from the base-port number to the base-port number plus five. The base-port numbers are dynamically allocated during the installation time.
By default, the Wireless server <oc4j>
element should be populated within opmn.xml. However, the populated entry only supports single Wireless server process and thus is not suitable for load balancing and failover. The configuration for load balancing and failover must be manually added.
The OC4J-related configuration files are located in $ORACLE_HOME/j2ee/OC4J_Wireless/config directory. The default configuration is set for running single Wireless server process.
To support load balancing and failover features, you must modify the the OC4J configuration files orion-web.xml and /WEB-INF/web.xml as described in the following steps.
There are two orion-web.xml files, one for Wireless web server, one for the wireless modules. They are located in the following directories:
For both of these files, add the following to the main body of the <orion-web-app>
tag:
<cluster-config />
There are two web.xml files, one for Wireless web server and one for the Wireless modules. They are located in the following directories:
For both of these files, add the <distributable />
tag to the main body of <web-app>
In Oracle9iAS 9.0.2, wireless applications cannot be clustered using the Oracle9iAS clustering mechanism. However, you can configure Oracle9iAS 9.0.2 to achieve a high-availability deployment by completing the following steps.
[oracle home]/dcm/bin/dcmctl stop
[oracle home]/bin/emctl stop
[oracle home]/opmn/conf/ons.conf
exists on each of the mid-tiers. Verify that the infrastructure tier contains IP-address entries for all the other tiers. If not, file and add missing IP-address entries.
This can be done from the EM console or by modifying the file:
[oracle home]/opmn/conf/opmn.xml
.
For details and concepts of OC4J instance and OC4J islands, refer to the OC4J Administration Guide. For instance, if you modify opmn.xml
, a typical entry to start four OC4J processes in the default island would be of the form:
<oc4j maxRetry="3" instanceName="OC4J_Wireless" gid="OC4J_Wireless" numProcs="4">
mod_oc4j
configuration file for each middle-tier (that is, [oracle home]/Apache/Apache/conf/mod_oc4j.conf
), modify the mount-point entries for the Wireless runtime. If two mid-tiers [M1 and M2] are used, the entries should be of the form:
Oc4jMount /ptg instance://m1.c1.mysite.com:OC4J_Wireless,m2.c2.se4637-u-sr006.us.oracle.com:OC4J_Wireless
and
Oc4jMount /ptg/* instance://m1.c1.mysite.com:OC4J_Wireless,m2.c2.se4637-u-sr006.us.oracle.com:OC4J_Wireless
c1
and c2
are the respective Oracle9iAS 9.0.2 instance names. You determine instance names by running the command:
[oracle home]/dcm/bin/dcmctl whichInstance
.
These entries should be exactly the same for all middle tier machines.
[oracle home]/dcm/bin/dcmctl updateConfig
to update the DCM repository with the configuration file changes.
On slow machines, a DCM error (timeout) of the form ADMN-906005 may appear. If this occurs, run the command [oracle home]/dcm/bin/dcmctl getReturnStatus
and wait until the command exits. This confirms that the changes have been propagated to the DCM repository.
<cluster-config/>
under the <orion-web-app>
tag in the file [oracle home]/j2ee/OC4J_wireless/application-deployments/ptg/ptg-web/orion-web.xml
.
[oracle home]/dcm/bin/dcmctl start
.
[oracle home]/bin/emctl start
Currently, high-availability support is only available for the core server runtime (by default mapped to the URI /ptg/rm
).
For more information, refer to the OC4J documentation.
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|