uCosminexus Application Server, Web Container Functionality Guide
If a method exceeding 64 KB exists in JavaVM, an error occurs during the generation of the class file or the java.lang.LinkageError exception occurs when the class is loaded. Therefore, the byte code for one method must have a size within 64 KB.
Also, even if the size is within 64 KB, if a method with an extremely big size exists, the following adverse effects might occur:
- GC processing takes extremely long time.
- JIT compilation takes extremely long time.
- JIT compilation consumes extremely large amount of memory.
In the Web application, the byte code of one method might exceed 64 KB due to the auto-generated java source code. The following points describe the auto-generation of the java source code and the reviewing method when the method size is big.
- Organization of this subsection
- (1) Auto-generation of the java source code
- (2) Reviewing method when the method size is big
(1) Auto-generation of the java source code
The auto-generation of the java source code is as follows:
- Auto-generation in the JSP specifications
In the JSP specifications, the java source code is automatically generated in the _jspService method or the doTag method from the contents described in the JSP file or tag file.
- Auto-generation when the custom tag is used in the Application Server
In the Application Server, if the custom tag is used, the processing of the custom tag and contents described in the body are changed into a method and the java source code is automatically generated.
The custom tag can be converted into a method when the processing of the custom tag or all the custom tags included in the body fulfill the following conditions:
- The attribute and body are scriptless.
- The script variable is not defined.
(2) Reviewing method when the method size is big
When the number of lines of the methods for auto-generated java source code exceeds 1000 lines, including the comments and blank lines, the messages KDJE39231-W and KDJE39333-W are output.
If a message is output, review the body contents of the JSP file, tag file, or the custom tag.
The following are the reviewing methods for each location to be reviewed:
- When the size of the JSP file contents is big
Divide the JSP file using dynamic include (include action).
- When the size of the tag file contents is big
Implement one of the followings:
- Divide the tag files used from the JSP file into multiple tag files.
- Divide the tag files such that another tag file is invoked from the tag file.
- When the size of the custom tag body is big
Divide the custom tag using dynamic include (include action).
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.