![]() |
|
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:
idle-timeout-minutes property, the default value used by the Server will be 5 minutes.number-of-trials property, the default value used by the Server will be 2.initial-heap-size-megabytes or maximum-heap-size-megabytes, the Server uses the default value of 120m for initial heap size and 200m for maximum heap size.out-of-process compilation is disabled by setting the enabled attribute to false of the out-of-process-compilation tag and J2SE1.4 is being used then the default behavior of the Server would be to use compilation.Click here to read about how to use Jikes Compiler.
| © Pramati Technologies 2007 | Runs on Pramati Server | Feedback | Legal |