Setting Java properties for the OC4J instance is therefore done in a slightly different way.
1. An OC4J standalone environment is created by extracting the contents of the oc4j_extended.zip file. This gives you an simple yet complete OC4J environment.
To start OC4J standalone, you call the Java executable yourself and run the oc4j.jar file.
Thus in this sort of environment, you provide the Java properties (-X, -D) on the command line
>java -Xmx256m -Ddebug.log=true -jar oc4j.jar
2. In an Oracle Application Server environment, an OC4J instance is launched (and monitored/stopped) by the OPMN service.
The OPMN service reads a configuration file $ORACLE_HOME/opmn/conf/opmn.xml that defines what processes OPMN needs to start, and also what environment needs to be supplied to the process.
The Java properties for an OC4J instance are defined within its start-parameters/java-options tag in its opmn.xml definition.
<process-type id="admin" module-id="OC4J" status="enabled">To add extra Java options, this opmn.xml file can be modified to set the additional property values required. Don't forget to take a backup first.
<module-data>
<category id="start-parameters">
<data id="java-options"
value="-Xrs -server -XX:MaxPermSize=128M
-ms512M -mx1024M -XX:AppendRatio=3
-Djava.awt.headless=true
-Dhttp.webdir.enable=false"/>
</category>
<category id="stop-parameters">
<data id="java-options"
value="-Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
</category>
</module-data>
<start timeout="600" retry="2"/>
<stop timeout="120"/>
<restart timeout="720" retry="2"/>
<port id="default-web-site" range="12501-12600" protocol="ajp"/>
<port id="rmi" range="12401-12500"/>
<port id="rmis" range="12701-12800"/>
<port id="jms" range="12601-12700"/>
<process-set id="default_group" numprocs="1"/>
</process-type>
Once you change the file, execute the command below to request OPMN to reload the configuration file into memory:
>$ORACLE_HOME/opmn/bin/opmnctl reload
and then start the OC4J instance.
As of the Oracle Application Server 10g R3 (10.1.3.1) release, the Java options for an Oc4J instance can be set directly from Application Server Control console.No need to manually edit the opmn.xml file.
The Start Parameters:Java Options settings can be accessed using the Server Properties page of the OC4J instance you wish to configure.







