Home arrow Oracle arrow Creating, Copying, and Managing OC4J Instances

Creating, Copying, and Managing OC4J Instances

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).

TABLE OF CONTENTS:
  1. Creating, Copying, and Managing OC4J Instances
  2. Using the Application Server Control
  3. CERTIFICATION OBJECTIVE 8.04
  4. Using the Application Server Control
  5. OC4J Administration Page
  6. OC4J Applications Page
  7. CERTIFICATION OBJECTIVE 8.05
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 10
February 22, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ORACLE ARTICLES

- Oracle Java Security Woes Continue
- Oracle's New IaaS Cloud Option: There's a Ca...
- Oracle Acquires Eloqua to Boost Cloud Presen...
- Choosing Innovation: Oracle Survey Insights
- Oracle Fixes Privilege Escalation Bug
- Oracle`s Communications Service Availability...
- Oracle Releases Exalytics, Taleo Plans
- Oracle Releases Communications Network Integ...
- Oracle Releases Communications Data Model 11...
- Oracle Releases PeopleSoft PeopleTools 8.52
- Oracle Integrates Cloudera Apache Distro, My...
- Oracle Releases MySQL 5.5.18
- Oracle Announces NoSQL Database Availability
- Sorting Database Columns With the SELECT Sta...
- Retrieving Table Data with the LIKE Operator

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: