Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (10.1.3.5.0)

Part Number E13981-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Deploying a Large EJB Application

This section describes the following:

For more information, see "Deploying Large Applications" in the Oracle Containers for J2EE Deployment Guide.

Tuning the VM to Avoid Out Of Memory Errors During Deployment

If a very large application (EAR) is deployed to OC4J, an OutOfMemory exception may be thrown at deployment time.

Your VM heap and permanent space configuration can cause such an exception. By default, heap and permanent space is set to 64 MB.

If there is a heap space problem, the heap space should be specified as: java -Xmx750m -Xms512m.

If there is a permanent space problem, the permanent space should specified as: java -Xmx750m -Xms512m -XX:PermSize=128m -XX:MaxPermSize=256m.

Configuring the Temp Directory to Avoid Out Of Memory Errors During Deployment

If the deployment process is interrupted for any reason, you may need to clean up the temp directory, which by default is /var/tmp on your system. The deployment wizard uses 20 MB in swap space of the temp directory for storing information during the deployment process. At completion, the deployment wizard cleans up the temp directory of its additional files. However, if the wizard is interrupted, it may not have the time or opportunity to clean up the temp directory. Thus, you must clean up any additional deployment files from this directory yourself. If you do not, this directory may fill up, which will disable any further deployment. If you receive an OutOfMemory exception, check for space available in the temp directory.

To change the temp directory, set the command-line option for the OC4J process to java.io.tmpdir=<new_tmp_dir>. You can set this command-line option in the Server Properties page. Drill down to the OC4J Home Page. Scroll down to the Administration Section. Select Server Properties. On this page, Scroll down to the Command Line Options section and add the java.io.tmpdir variable definition to the OC4J Options line. All new OC4J processes will start with this property.

Disabling Batch Compilation to Avoid Out Of Memory Errors During Deployment

If your application (EAR) contains multiple JAR files, you can try disabling batch deployment to fix OutOfMemory exceptions. However, if your EAR file only has one JAR file, this approach will not fix such exceptions: in this case, you must tune the VM (see "Tuning the VM to Avoid Out Of Memory Errors During Deployment").

If OC4J throws an OutOfMemory exception at deploy time, and you have already tried tuning the VM (see "Tuning the VM to Avoid Out Of Memory Errors During Deployment") and temp directory (see "Configuring the Temp Directory to Avoid Out Of Memory Errors During Deployment"), you may also attempt to compile in nonbatch mode. Although nonbatch mode requires less memory, this mode will result in a longer deployment time.

To enable or disable batch compilation, use the <application> or <orion-application> element attribute batch-compile.

The default value of batch-compile is true.

To disable batch compile, set this attribute to false.

Example 28-1 shows how to configure this attribute in the orion-applicatin.xml deployment descriptor.

Example 28-1 Disabling Batch Compilation in the orion-application.xml File

<orion-application batch-compile ="false">
...
</orion-application>

If out of memory errors persist, try disabling batch compile.