Oracle
  Home arrow Oracle arrow Creating, Copying, and Managing OC4J I...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
OLM
 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? 
ORACLE

Creating, Copying, and Managing OC4J Instances
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 7
    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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Creating, Copying, and Managing OC4J Instances
    (Page 1 of 7 )

    In this second part of a multi-part series covering the management of OC4J and configuring J2EE applications with Oracle 10g Application Server, we focus in on OC4J instances. This article is excerpted from chapter eight of the Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill; ISBN: 0072262710).

    CERTIFICATION OBJECTIVE 8.03

    Creating an OC4J Instance

    Each OracleAS instance is created with a default OC4J instance named home, as shown here:

    $ opmnctl status
    Processes in Instance: infra_10_1_2.ntl-alaptisam.netbsa.org
    ias-component | process-type | pid | status
    -------------------------------------------
    LogLoader     | logloaderd   | N/A | Down
    DSA           | DSA          | N/A | Down HTTP_Server   | HTTP_Server  |3744 | Alive dcm-daemon    | dcm-daemon   |7176 | Alive OC4J          | home         |6268 | Alive OC4J          | oca          |9164 | Alive OC4J          | OC4J_SECURITY|7596 | Alive OID           | OID          |7172 | Alive $

    You can create a new OC4J instance either by using the command-line utility dcmctl, or by using the Application Server Control. Let’s review the creation of a new OC4J instance using both methods in the following subsections.

    Using the dcmctl Utility

    You can use the dcmctl command-line utility to perform several OC4J administration tasks, including the following:

    1. Deploying and undeploying an application
    2. Creating and destroying an OC4J instance
    3. Listing applications
    4. Resynchronizing an OC4J instance
    5. Starting and stopping an OC4J instance
    6. Updating an OC4J instance configuration

    You use the dcmctl utility with the createComponent option to create a new OC4J instance. The standard syntax for using the dcmctl command is as follows:

      $ ORACLE_HOME/dcm/bin/dcmctl command [options]

    You can use the dcmctl command with various options. You use the createComponent option to create a new OC4J instance, as shown here:

      $ dcmctl createComponent -ct oc4j -co component_name

    In the dcmctl command, the two options denote the following:

    • -ct (component type) is a scope option that specifies that the dcmctl command be applied to the named component type, which in our case is oc4j.
    • -co (component name) is also a dcmctl scope option; it designates the name of a component during the creation of that component.

    Here’s an example showing how to create a new OC4J instance (the command type is oc4j, of course, and the component name—that is, the name of our new OC4J instance—is OC4J_Test):

      $ dcmctl CreateComponent -ct oc4j -co OC4J_Test
      Component Name: OC4J_Test
      Component Type: OC4J
      Instance:       infra_10_1_2.ntl-alaptisam.netbsa.org $

    To check that the new OC4J instance, OC4J_Test, has been successfully created, use the ListComponents option of the dcmctl utility, as shown here:

      C:\OraHome_2\dcm\bin> dcmctl ListComponents
      1
      Component Name: home
      Component Type: OC4J
      Instance:       infra_10_1_2.ntl-alaptisam.netbsa.org
      2
      Component Name: HTTP_Server
      Component Type: HTTP_Server
      Instance:       infra_10_1_2.ntl-alaptisam.netbsa.org
      3
      Component Name: oca
      Component Type: OC4J
      Instance:       infra_10_1_2.ntl-alaptisam.netbsa.org
      4
      Component Name: OC4J_SECURITY
      Component Type: OC4J
      Instance:       infra_10_1_2.ntl-alaptisam.netbsa.org
      5
      Component Name: OC4J_Test
      Component Type: OC4J
      Instance:       infra_10_1_2.ntl-alaptisam.netbsa.org
      6
      Component Name: OID
      Component Type: OID
      C:\OraHome_2\dcm\bin>

    The dcmctl listComponents command returns a list of all OracleAS components within the scope you specify. If you don’t specify the scope (i.e., use the command without any arguments), you’ll get a list of all OracleAS components in that instance. If you’re using dcmctl shell, you can limit the list of components using a pattern. In the following example, I use "4" as a pattern matcher in order to get a list of all OC4J instances within an OracleAS instance:

      $ dcmctl listComponents *4*

    To remove an OC4J instance with the dcmctl utility, use the dcmctl command with the removeComponent option (co again stands for the component name):

      $ dcmctl removeComponent -co nameOfOC4JInstance

    on the job:  When you create a new OC4J instance, the OC4J instance isn’t automatically started. You must start the new instance either through Application Server Control or through the opmnctl utility.

    Sometimes, you may have to remove an entire OracleAS instance using operating system commands (by removing the files and directories belonging to the OracleAS installation). When you adopt this much wider-scoped procedure to remove an OC4J instance instead of using the removeComponent command just shown, the DCM repository will continue to retain the removed OC4J instance’s information. This information may potentially hurt you during a subsequent reinstallation of OracleAS. You can use the destroyInstance command to clear the repository of all information pertaining to the removed OracleAS instance, as shown here (-i stands for the OracleAS instance name):

    When you execute the following command, the dcm.conf file, the targets.xml file, and the repository directory are all automatically purged of all the OracleAS instance--related information:

      $ dcmctl destroyInstance -i instance1

    More Oracle Articles
    More By McGraw-Hill/Osborne


       · This article is an excerpt from the book "Oracle 10g Application Server Exam Guide,"...
     

    Buy this book now. This article is excerpted from the Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill; ISBN: 0072262710). Check it out today at your favorite bookstore. Buy this book now.

       

    ORACLE ARTICLES

    - 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...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway