Warning!!! Please note that all the information provided in this section is based on author’s experienceworking with OC4J processes. Java “Full thread dump” and Java classes decompilation were the mainmethods to get the information. Because of that and because the fact that Oracle Corporation doesn’tpublish OC4J architecture publicly, the OC4J architecture described below possibly is not 100%accurate. Author hopes that it is correct in main terms and will be useful for reader to understand betterhow to troubleshoot and tune OC4J.
OC4J physical structure (source, configuration and application files structure) isdescribed in the Oracle documentation (See. OC4J Standalone User's Guide
Memory structures of OC4J process are not covered in this paper in details. They arehighly dependent on the application you are using. For sure there are OC4J specificmemory structures for storing such information as HTTP session list, managingthreads and connections pools etc. as well. But they are not covered in this paper.There will be additional paper on OC4J memory structures in the future probably.
For troubleshooting and performance purposes it is extremely important to understandthe architecture of OC4J instance (process). What are the main treads? What are theirresponsibilities? OC4J process architecture is a matter of a great interest in a contextof this paper.OC4J is written entirely in Java language and it is a Java application. Not dependingon the configuration you are using, JRE
is used to run OC4J instance. The commandbelow is used to start-up any OC4J instance:
<jre location>/bin/java <1 set of parameters> -jar oc4j.jar <2 set ofparameters>
Any java process is multithreaded. It is vital to know multithreading concepts forunderstanding OC4J internals. Multithreading is the way how many tasks (threads)can be executed within a single java process. Threads are executed in the samecontext and have access to all process memory structures. Different operationalsystems have different implementations of multithreading within the single process.In most of the operational systems you will see OC4J as single process. There aredifferent possibilities on different OS to monitor threads within the single process.
for example realizes multithreading through light-weight processes.Light-weight processes can be monitored easily. You can use
prstat -Lp <pid>
to seeCPU utilization by different threads within the single process. Unlike most of the
The physical structures of OC4J is the mostly the same despite OC4J version. Author recommends toread “Oracle® Application Server Containers for J2EE Standalone User's Guide, 10g Release 2(10.1.2), Part No. B14361-01” chapter “Advanced Configuration and Development”
There is JDK used actually, OC4J instance for JSP executing compile any JSP to an *.java file and*.calss file afterwards.