- Challenges in Developing a Scalable Java Environment with Oracle8I
- Speed of Execution
Performance problems due to scalability concerns are minimized in Oracle8i by native Java compilation.
Java executes platform-independent bytecodes on top of a virtual machine. The virtual machine then deals with the specific hardware platform, which makes the execution slightly inefficient.
Oracle JServer provides all the core Java class libraries and Oracle-provided Java code natively compiled. Java classes exist as shared libraries in the $ORACLE_HOME/javavm/admin directory. Each shared library corresponds to a Java package and is used by the Aurora virtual machine as needed. In general, the use of natively compiled code instead of bytecode interpretation improves speed (by 2 to 10 times), but it also takes up more memory (2 to 3 times more). The current release of Oracle doesn't provide native compilation for your Java code. In the current JServer release, Java code loaded in the server is interpreted, whereas the core classes such as java.lang.* are fully compiled. As a result, the more Java code used from core classes and the more Oracle-provided class libraries used, the more speed benefit that can be obtained.
The Oracle8i Aurora Java virtual machine can efficiently and concurrently schedule Java execution for thousands of users. Although Oracle8i supports Java language-level threads, all Java code in Oracle8i executes as a call within a session. Therefore, it is not necessary to write server/resident Java code that uses Java's multithreading capabilities to obtain scalability. Instead, the Java programs can use the same scalability architecture used by Oracle internally.