Using isCOBOL Code Coverage in application server environments
Thin client
In a thin client environment it is possible to analyze the application server (isCOBOL Server) activity by starting the server process with the same -javaagent option used for the runtime. E.g.:
iscserver -J-javaagent:/path/to/isprofiler.jar=coverage;[options] |
The Coverage output is shown when the whole application server is terminated or when the
CCOV-FLUSH function of
C$COVERAGE is called, and it includes the analysis of all clients activities mixed together, therefore, if you need to analyze some programs in a thin client environment, you should use a dedicated application server with only one client connected.
Tomcat and other application servers
In an application server environment like Tomcat it is possible to profile the programs’ activity by starting the server process with the same -javaagent option used for the runtime. Add the following Java option to the startup options of your application server.:
-javaagent:/path/to/isprofiler.jar=coverage;[options] |
The Coverage output is shown when the whole application server is terminated or when the
CCOV-FLUSH function of
C$COVERAGE is called, and it includes the analysis of all clients activities mixed together, therefore, if you need to profile some programs in an application server environment, you should use a dedicated application server with only one client connected.
Troubleshooting
The following exception may occur while running programs under Code Coverage:
org.objectweb.asm.MethodTooLargeException: Method too large: PROGRAM.PARAGRAPH ()I |
The reason is that the Coverage feature adds on the fly some instructions to the methods in your class, it’s like if you added some COBOL statements to the program’s paragraphs. If a method grows too much, it can lead to the above error. In order to get rid of it, recompile your program with the
-sns=Statements option.