Configuring Compilers

When JSPs and EJBs are deployed, OC4J must generate and compile Java implementation classes to support them. By default, OC4J will use the compiler bundled with the JDK being used to run the server and will launch a separate process every time it needs to compile something. This can be very slow, so you'll probably want to change it to run in process , or choose an alternative, faster compiler, such as jikes . Experiment with both options to see which works best on your platform.

In-Process Compilation

Many compilers, including the default javac compiler, can be run directly within the JVM without needing to launch a separate process. This significantly reduces overhead, and in some cases, can shave minutes off your deployment and startup times.

To enable in-process compilation with javac , add the following line to server.xml :

 <java-compiler name="javac" in-process="true" /> 

Compiling with Jikes

Jikes is an open -source and freely available compiler that is often much faster than javac , even though it doesn't support in-process compilation. Your results may vary depending on your platform and application.

To configure OC4J to compile using jikes , add the following line to server.xml and fill in the appropriate bindir value:

 <java-compiler name="jikes" bindir="/usr/local/jikes/bin " in-process="false" /> 

You can download Jikes from the IBM developerWorks website. For more information, visit http://www-124.ibm.com/developerworks/oss/jikes/ .



Oracle Application Server 10g. J2EE Deployment and Administration
Oracle Application Server 10g: J2EE Deployment and Administration
ISBN: 1590592352
EAN: 2147483647
Year: 2004
Pages: 150

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net