02 September 2014

WLS: Precompile ear/war EJB/JSP

WLS has a very useful tool to precompile EJBs and JSPs so we can avoid extra overhead at runtime on the container.

It is called APPC, this tool calls underneath to jspc and ejbc to achieve this task.
http://docs.oracle.com/cd/E17904_01/web.1111/e13719/appc_ejbc.htm#EJBPG1088

After calling setDomainEnv.sh (.cmd) we can execute directly: weblogic.appc [files]

Also, we can compile only JSPs files with: weblogic.jspc [files]
http://docs.oracle.com/cd/E17904_01/web.1111/e13712/reference.htm#i57791

It is recommended to use it at development time as well, so we can hit compilation errors before the first request on the web container.

It exists the Ant task as well: wlapcc

Sample:

java weblogic.jspc -forceGeneration -keepgenerated -verboseJspc -d d:\tmp\export\ -classpath .;D:\proj\webapp-wl-v4\web\WEB-INF\classes;D:\proj\webapp-wl-v4\foo.jar;D:\proj\webapp-wl-v4\lib\bar.jar index.jsp




No comments :

My Blog List

Blog Archive

There was an error in this gadget

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.