Creating an OC4J Instance Each OracleAS instance is created with a default OC4J instance named home, as shown here: $ opmnctl status 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:
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:
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 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 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
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
blog comments powered by Disqus |
|
|
|
|
|
|
|