Oracle
  Home arrow Oracle arrow Page 15 - Oracle Application Server 10g Architecture and Administration
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

Oracle Application Server 10g Architecture and Administration
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 56
    2004-07-13


    Table of Contents:
  • Oracle Application Server 10g Architecture and Administration
  • Hardware Architecture of Application Server 10g
  • Client Tier, Web Tier, OHS, and Web Cache
  • App Server Tier, Partitioning
  • Application Server 10g Clusters and Farms and Database Tier
  • Application Server Discoverer
  • Oracle Application Server Wireless
  • Single Sign-On (SSO)
  • Oracle Application Server 10g Administration
  • Command-Line Interfaces or OEM?
  • Instance Manager Home Page
  • Category Command Usage Table
  • Command Line Interface and Scripts
  • EM Commands with emctl
  • Managing Application Server 10gwith dcmctl
  • Miscellaneous Application Server 10g Commands and Sumary

  • 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


    Oracle Application Server 10g Architecture and Administration - Managing Application Server 10gwith dcmctl
    ( Page 15 of 16 )

    The Distributed Configuration Manager (DCM) is the master utility for Application Server 10g. The DCM is responsible for maintaining configuration by updating the configuration files on each server. DCM also stores the values of the parameters within each configuration file on each server within isadb. Note that if you choose not to implement the infrastructure (not recommended), the parameter files will exist as flat files on each server.

    The dcmctl utility has two important argument settings, verbose (-v) and diagnostic (-d). These are important options because they provide additional diagnostic information about the state of your dcmctl commands. Starting in Application Server 10g release 9.0.4, you can use set commands to enable and disable these options:

    dcmctl set –v on
    dcmctl set –d on

    Once you have established the settings, you can use dcmctl for a variety of Application Server 10gadministrative functions. Here is an example of using dcmctl to start the HTTP server (OHS):

    dcmctl start -ct ohs
    http://diogenes:7777
    http://diogenes:1080

    You can also use the dcmctl command to deploy OC4J applications, and the dcmctl commands can be embedded into command lists for the purpose of deploying them on many servers. For example, let’s create a list of dcmctl commands to deploy an OC4J application on multiple servers. Assume that we have saved this file as /home/oracle/dcm_dep.cmd on our main server:

    dcm_dep.cmd

    echo "creating testcluster"
    createcluster testcluster
    echo "joining testcluster"
    joincluster testcluster
    echo "creating component component1"
    createcomponent -ct oc4j -co component1
    echo "starting component to deploy application"
    start -co component1
    echo " deploying application"
    deployapplication -f /stage/apps/app1.ear -a app1 -co component1
    echo "starting the cluster"
    start -cl testcluster
    echo "verifying everything started "
    getstate
    exit

    So, how can you execute this script on all 20 of your OC4J servers? You can create a shell script to loop through a list of all servers and deploy the J2EE application on each OC4J server. This script requires the remote shell (rsh) and remote copy (rcp) UNIX commands. The rsh command is enabled by placing server host names in your .rhosts file. The rsh facility should only be implemented if all Application Server 10g servers are safe behind a firewall, because rsh allows a hack who gains access to one server to access all other servers in the .rhosts file.

    deploy_oc4j.ksh

    #!/bin/ksh
    #***************************************************
    #
    # Copyright (c) 2003 by Donald K. Burleson
    #
    # Deploy Oracle Application Server 10g application on multiple servers
    #
    #***************************************************
    # First, we must set the environment . . . .
    export ORACLE_BASE=/private/ias
    # Use this ORACLE_HOME for midtier applications
    #export ORACLE_HOME=$ORACLE_BASE/midtier
    # Use this ORACLE_HOME for infra applications
    export ORACLE_HOME=$ORACLE_BASE/infra
    SET PATH=.;$PATH;%ORACLE_HOME%dcmbin;%ORACLE_HOME%j2eehome;
    %ORACLE_HOME%ldapbin;%ORACLE_HOME%ldapodiadmin;%ORACLE_HOME%
    ocabin;%ORACLE_HOME%opmnbin;%ORACLE_HOME%portaladminplsqlsso;
    %ORACLE_HOME%ssolib;%ORALE_HOME%uddilib;%ORACLE_HOME%upgrade;
    %ORACLE_HOME%wirelessbin
    export ORACLE_SID=iasdb
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
    #export DISPLAY=tor:2.0
    # Loop through each host name . . .
    for host in `cat ~oracle/.rhosts|cut -d"." -f1|awk '{print $1}'|sort -u`
    do
    # Get the ORACLE_HOME on each Oracle Application Server 10g server
    home=`rsh $host "cat /etc/oratab|egrep ':N|:Y'|grep -v *|cut -f1/
    d':'"``
    # Copy the dcm command file and ear to the remote server
    rcp -p /home/oracle/dcm_dep.cmd ${host}:~oracle/dcm_dep.cmd
    rcp -p /stage/apps/app1.ear ${host}:/stage/apps/app1.ear
    # Set and check file permissions
    rsh $host "chmod 500 ~oracle/dcm_dep.cmd "
    rsh $host "ls -al ~oracle/dcm_dep.cmd"
    # Execute dcmctl to start the dcmctl shell:
    rsh $host "$home/dcm/bin/dcmctl shell –f ~oracle/dcm_dep.cmd"
    done

    As you can see, the dcmctl command is very useful when you must deploy applications across many J2EE instances.

    This chapter is from Oracle Application Server 10g Administration Handbook, by Garmany and Burleson. (McGraw-Hill/Osborne, 2004, ISBN: 0072229586). Check it out at your favorite bookstore today. Buy this book now.



     
     
    >>> 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 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek