DevPortal

How do I use Compilation Server?


When a request is received for a JSP file the jsp file is parsed to create a servlet and servlet is compiled before loading and serving to the client. This compilation can either be in-process or out-process. In-process compilation involves carrying out the compilation in the same VM in which server is running. The in-process compilation implemented by us presently has a few drawbacks.

Since the compilation is done in the same VM in which the server is running the memory requirement of server increases. Out-process compilation involves starting a new separate VM and carrying out the compilation in that VM. The out-process compilation suffers with following drawbacks:

The server has a feature called Compilation Server which runs in a new VM. Every time a compilation request comes the request will be sent to the compilation server. The Compilation Server does the compilation and writes the response on its own System.out and System.err.

The following tag in deploy-config.xml file shows how to configure a compilation server:

<compilation-server>
  <options>
    <property name="initial-heap-size-megabytes" value="120"/>
    <property name="maximum-heap-size-megabytes" value="200"/>
    <property name="idle-timeout-minutes" value="5"/>
    <property name="number-of-trials" value="5"/>
  <options>
<compilation-server>

Note that:

Click here to read about how to use Jikes Compiler.


© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal