Oracle
  Home arrow Oracle arrow Page 7 - Creating, Copying, and Managing OC4J Instances
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ORACLE

Creating, Copying, and Managing OC4J Instances
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 10
    2007-02-22


    Table of Contents:
  • Creating, Copying, and Managing OC4J Instances
  • Using the Application Server Control
  • CERTIFICATION OBJECTIVE 8.04
  • Using the Application Server Control
  • OC4J Administration Page
  • OC4J Applications Page
  • CERTIFICATION OBJECTIVE 8.05

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Creating, Copying, and Managing OC4J Instances - CERTIFICATION OBJECTIVE 8.05
    ( Page 7 of 7 )

    Configuring OC4J

    When I mention configuring OC4J, I mean something broader than merely configuring the OC4J server itself. Our main motivation in learning about the OC4J server is to learn how to deploy J22 applications with it. Thus, configuring OC4J involves the configuration of the OC4J server itself, as well as the configuration of the J2EE applications framework. In addition, you must configure the mod_oc4j module, which lets the Oracle HTTP Server communicate with the OC4J server instance.

    An OC4J instance has three groups of configuration files: mod_oc4j configuration files, OC4J server configuration XML files, and the J2EE application deployment XML files. As you can tell, you use the first set of files to configure the interaction of the mod_oc4j module with the Oracle HTTP Server. You use the second set of files to configure the OC4J server proper, and the last set of configuration files to configure the deployment of J2EE applications via the OC4J server. These three groups of configuration files are reviewed in the following subsections.

    on the job:  Port number 7777 is the default port for the Oracle Web listener. You must specify the port number if you are using a non-default port number. However, OracleAS Web Cache uses port 7777, and the HTTP server will actually be listening on port 7778.

    on the job:  You can’t modify J2EE XML files such as web.xml and ejb-jar.xml after deploying an application. You can, however, modify the OC4J-specific XML files of the application.

    The mod_oc4j Configuration Files

    The mod_oc4j HTTP server module facilitates communication between the Oracle HTTP Server and the OC4J instance and enables access to HTTP clients. The mod_oc4j module runs within the HTTP server and performs the following functions:

    • Identifying the requests it needs to serve
    • Determining the particular OC4J instance it should route the request to
    • Communicating with the selected OC4J instance backend processes

    OPMN keeps mod_oc4j aware of the status of the instances, and thus, oc4j will route jobs only to the running processes. Because mod_oc4j is aware of the OracleAS

    exam watch: The mod_oc4j module is embedded in the Oracle HTTP Server module and is in charge of forwarding OC4J requests from clients. The mod_oc4j.conf file configures the mount points or virtual paths specifying the contexts that it should forward to the OC4J instance. 

    Clusters and OC4J islands (an OC4J island is a set of OC4J processes that replicates session state among all the OC4J processes that are part of the island) the OC4J processes can run on multiple nodes, and its routing is calculated to provide transparent failover as well.

    By default, the mod_oc4j module will direct all j2ee/ context-bound applications to the OC4J server. You can, however, add other mount points for this context in the mod_oc4j. conf file, if you plan on using other contexts (for example, test/). Once you start your Oracle HTTP Server, the context changes will be in effect and all new requests for the test/ context will be sent to the OC4J server.

    The mod_oc4j configuration files are located in the following directory:

    $ORACLE_HOME/Apache/Apache/conf

    Here’s a typical mod_oc4j configuration file, named oc4j.conf:

    ########################################## # Oracle iAS mod_oc4j configuration file: mod_oc4j.conf ########################################## LoadModule oc4j_module modules/ApacheModuleOc4j.dll
    <IfModule mod_oc4j.c>
        <Location /oc4j-service>
             SetHandler oc4j-service-handler
             Order deny,allow
             Deny from all
             Allow from localhost ntl-alapatisam.netbsa.org ntl-alapatisam
        </Location>
    Oc4jMount /j2ee/*
    Oc4jMount /forms90 FORMS_PROD
    </IfModule>

    Let’s briefly analyze the oc4j.conf file, which is called as part of the Oracle HTTP Server configuration file httpd.conf.

    1. The LoadModule directive tells the Oracle HTTP Server that the oc4j_module should be loaded each time the Oracle HTTP Server starts.
    2. The <IfModule> directive tells the HTTP server what it should do when it encounters the oc4j_module in the httpd.conf file, which is the configuration file for the Oracle HTTP Server.
    3. The <Location> directive specifies the virtual path /oc4j-service, which will launch the oc4j-service handler, but only if the URL comes from the address specified within the Location directive.
    4. The lines starting with the Oc4jMount command help set the URL mapping. The Oc4jMount command lines specify the virtual paths for mod_oc4j to route to a particular OC4J instance. For example the virtual path /j2ee/* belongs to the OC4J home instance. Any request that contains the regular expression /j2ee/* is then routed to the home OC4HJ instance. In this example, the URL mapping for this OC4J instance makes the Oracle Application Server route all requests for /forms90 FORMS_PROD to this OC4J instance. You can look at this as the rough mod_oc4j equivalent of an OHS Alias. All deployed J2EE applications must be associated with a "root context" (an URL prefix), which serves to identify the requests that need to be handled by mod_oc4j. The Oc4jMount command maps the root context to the particular OC4J instance to which an application is deployed.

    Please check back next week for the continuation of this article.



     
     
    >>> More Oracle Articles          >>> More By McGraw-Hill/Osborne
     

       

    ORACLE ARTICLES

    - Oracle's Turn to Play in the Sun
    - Implementing and Using Oracle`s Restore Poin...
    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek