6.1. Understanding the Oracle JServer

The Oracle JServer consists of both a Java Virtual Machine (JVM) and a Java execution environment. The JServer JVM is compatible with the standard Java language specification and Java Virtual Machine specification. The JServer contains a CORBA 2.0-compliant Object Request Broker (ORB), and JServer supports the Enterprise JavaBeans standard.

Traditional Java Development Kit (JDK) programs are run using the java command-line utility, which creates an operating system process for each Java program that you run. Before you can run your Java programs using the JServer JVM, you must perform the following steps:

  1. Load your Java classes into the database.

  2. Create wrappers, which you must write in PL/SQL, around your Java methods.

Once you have performed these tasks, you may invoke the PL/SQL wrappers, which then run your Java programs' methods within a session in the JServer JVM. Each JServer session is conceptually similar to a database session, with each session logically separated from the others. The JServer JVM manages each session to increase scalability and reduce memory requirements by sharing as much information as possible. Bear in mind that the JServer JVM does not contain GUI components, so the JServer JVM cannot be used to run GUI programs on the server.

The JServer JVM runs in the same process and memory space as the Oracle8i database kernel. This results in a significant increase in the scalability and performance of your Java stored ...

Get Java Programming with Oracle SQLJ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.