HomeOracle Page 3 - Creating, Copying, and Managing OC4J Instances
CERTIFICATION OBJECTIVE 8.04 - Oracle
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).
You can manage OC4J with the Application Server Control or OPMN, in addition to the DCMCTL utility. The recommended approach is to use the Application Server Control for performing day-to-day management of the OC4J instances. The Application Server Control makes the creation and management of OC4J instances a snap. However, you can also use the command-line utilities opmnctl and dcmctl to manage the OC4J instances noninteractively. These tools are ideal when you are using scripts to perform batch jobs, or for scheduled maintenance jobs. Let’s start by reviewing OC4J instance management using the two command-line utilities opmnctl and dcmctl, and then go on to learn how to use the Application Server Control for managing an OC4J instance.
Using OPMN
You use the opmnctl command-line utility to stop and start OC4J instances. As you may recall from Chapter 3, when you use the opmnctl utility with the ias-component option, you start or stop all subprocesses of a component. In this case, using the ias_component option, you can start and stop all OC4J instances running in an OracleAS instance, as shown here:
These two commands will start and stop all the OC4J instances in an OracleAS instance.
By using the process-type option, you can start and stop a specific OC4J instance. Here I show how you would start and stop a specific OC4J instances (named oc4J_Test) using opmnctl:
Note that these two commands will start and stop the single OC4J instance, OC4J_Test, respectively.
Using DCMCTL
Earlier in this chapter you learned how to create and delete OC4J instances using the dcmctl utility. You also learned how to use the listComponents command to list all the applications deployed in an OC4J instance. The dcmctl utility contains commands you can use to deploy an OC4J application, as you’ll see later in this chapter.