Programmer's Guide to Servlets in Enterprise Server 4.0
Table of Contents | Previous | Next | Index

Programmer's Guide to Servlets in Enterprise Server 4.0


Appendix D
JVM Configuration

The Java Virtual Machine (JVM) works by default without any additional configuration if properly set up.

However, if you need to specify settings for the JVM, such as additional classpath information, you can configure the JVM properties for Enterprise Server via the Administrator interface. You can add as many other properties as you want to (up to 64).

You can also configure JVM parameters by editing the jvm11.conf or jvm12.conf configuration files, (depending on which version of the JDK is being used) which reside under the server's config directory.

Here is an example jvm.conf file:

jvm.conf (example for JDK1.1):

[JVMConfig] 
#jvm.nativeStackSize=131072
#jvm.javaStackSize=409600
#jvm.minHeapSize=1048576
#jvm.maxHeapSize=16777216
#jvm.verifyMode=0
#jvm.enableClassGC=1
#jvm.enableVerboseGC=0
#jvm.disableAsyncGC=0
#jvm.verboseMode=1
jvm.enableDebug=1
jvm.debugPort=2525
jvm.classpath=/server_root/bin/https/jre/lib/classes.zip; ANY_OTHER_JAVA_SPECIFIC_PROPERTY
For example, to disable JIT you can add the following line to jvm.conf:

java.compiler=DISABLED
jvm12.conf (example for JDK1.2)

[JVMConfig] 
#jvm.minHeapSize=1048576
#jvm.maxHeapSize=16777216
jvm.enableClassGC=0
#jvm.verboseMode=1
#jvm.enableDebug=1
jvm.option=-Xrunoii
jvm.profiler=optimizeit
java.compiler=NONE
OPTITDIR=D:/App/IntuitiveSystems/OptimizeIt30D
The configuration file for JDK1.2 is similar to the one for JDK1.1. Generally you should use plain property options (like name=value) for the JDK1.2 configuration and jvm.option=options for JVM-vendor dependant configurations. There could be multiple occurrences of jvm.option parameters.

In Enterprise Server 4.0, jvm.conf files support a configuration parameter called jvm.stickyAttach. Setting this parameter to 1 causes threads to remember that they are attached to the JVM, thus speeding up request processing by eliminating calls to AttachCurrentThread and DetachCurrentThread. It can, however, have side effect as recycled threads that may be doing other processing can be suspended from the garbage collection pool arbitrarily.

For information about JVM, see The Java Virtual Machine Specification from Sun at

http://www.javasoft.com/docs/books/vmspec/html/VMSpecTOC.doc.html

Table of Contents | Previous | Next | Index

Last Updated: 08/12/99 12:39:32

Copyright © 1999 Netscape Communications Corp. All rights reserved.