JRun 4.0: Configuring individual JVM settings for each JRun Server
While modifying JVM configuration settings through the JRun Management Console (JMC) will update the JVM settings for all JRun servers installed on a particular machine, JVM configuration changes can be made on a per-JRun-server basis. This TechNote describes how to create individual server configuration files for JRun 4.0 servers.
Many JRun users maintain separate JVM configuration settings for each JRun server that is installed on a machine. For example, one server may use JRE 1.3.1 while another uses JRE 1.4. However, when making modifications to the JVM settings in JRun 4.0, the JMC will record those changes to a single configuration file -{jrun.rootdir}/bin/jvm.config. This file is read by all JVMs (and JRun servers) running on a particular computer, so changes made to the JVM configuration (JRE launcher, heap size, Java arguments, etc) in the JRun 4.0 JMC will be applied on a machine-wide basis.
In order to configure JVM properties on an individual JRun server-basis, the following steps may be used:
- Create a new file in the {jrun.rootdir}/bin directory - for example, jvm.config_new_server. The fastest way to do this is to simply copy and rename the existing jvm.config file. The contents of the file will be similar to the listing below. This new file is where you will create your server specific JVM configuration settings. You can create a new jvm.config_jrun_serv_name for each server on a machine.
# # VM configuration # # Where to find JVM, if {java.home}/jre exists then that JVM is used # if not then it must be the path to the JRE itself # # If no java.home is specified a VM is located by looking in these places # in this order: # # 1) JAVA_HOME environment variables (same rules as java.home above) # 2) bin directory for java.dll (windows) or lib/<ARCH>/libjava.so (unix) # 3) ../jre # 4) registry (windows only) #java.home=C:/javaprograms/jdk1.4 # Arguments to VMjava.args=-Xms32m -Xmx128m # java.class.path - use this for adding individual jars or # directories. When directories are included they will be searched # for jars and zips and they will be added to the classpath (in # addition to the directory itself), the jar to be used in launching # will be appended to this classpathjava.class.path={application.home}/servers/lib # # where to find shared libraries, again use commas to separate entriesjava.library.path= - To use this new configuration file for a JRun server, you will need to specify it to the JRun launcher program when it is invoked through the command line. An example of the command used to start the JRun default server with this configuration file is as follows:
jrun -config jvm.config_new_server -start default - To enable a new JVM configuration for a JRun server that will be running as a Windows service, you will need to install the JRun server as a service using the jrunsvc command line utility and include the -config option. The following example illustrates this command:
jrunsvc -install default "JRun Default Server" -config jvm.config_new_server
Note: If you have already installed a JRun server as a Windows service, you will first need to remove it and then reinstall it using the above command line syntax.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
