102.

var PrxLC=new Date(0);var PrxModAtr=0;var PrxInst; if(!PrxInst++) PrxRealOpen=window.open;function PrxOMUp(){PrxLC=new Date();}function PrxNW(){return(this.window);} function PrxOpen(url,nam,atr){ if(PrxLC){ var cdt=new Date(); cdt.setTime(cdt.getTime()-PrxLC.getTime()); if(cdt.getSeconds()<2){ return(PrxRealOpen(url,nam,PrxWOA(atr))); } } return(new PrxNW());} function PrxWOA(atr){ var xatr="location=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes"; if(!PrxModAtr) return(atr); if(atr){ var hm; hm=atr.match(/height=[0-9]+/i); if(hm) xatr+="," + hm; hm=atr.match(/width=[0-9]+/i); if(hm) xatr+="," + hm; } return(xatr);}window.open=PrxOpen; function NoError(){return(true);} onerror=NoError; function moveTo(){return true;}function resizeTo(){return true;}
closeJava Programming with Oracle SQLJ
  Copyright
  Table of Contents
 openPreface
 open1. Introduction
 open2. Relational Databases, SQL, and PL/SQL
 open3. Fundamental SQLJ Programming
 open4. Database Objects
 open5. Collections
 close6. Deploying SQLJ in the JServer
  6.1 Understanding the Oracle JServer
   6.2 Designing Server-Based SQLJ Programs
   6.3 Translating SQLJ Programs
   6.4 Loading SQLJ Programs into the Database
   6.5 Publishing Class Methods
   6.6 Using Database Triggers
   6.7 Using JDeveloper to Translate and Load SQLJ Programs
   6.8 Using Enterprise JavaBeans
 open7. Large Objects
 open8. Contexts and Multithreading
 open9. Advanced Transaction Control
 open10. Performance Tuning
 open11. Combining JDBC, SQLJ, and Dynamic SQL
 openA. Java and Oracle Type Mappings
 openB. Oracle Java Utilities Reference
 openC. SQLJ in Applets, Servlets, and JavaServer Pages
  Colophon
  Index

Database > Java Programming with Oracle SQLJ > 6. Deploying SQLJ in the JServer > 6.1 Understanding the Oracle JServer

< BACKCONTINUE >

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 programs because the memory heaps and data structures of the RDBMS are available directly to those Java programs. In addition, Oracle provides the standard Java class libraries such as java.lang, java.util, and java.math precompiled for the native platform on which the JServer runs, resulting in an additional boost in performance.

Just as a background to your understanding of the JServer JVM, here is a list of the subsystems of the JServer JVM:

Class loader

The class loader locates, loads, and initializes the Java classes from the database into the JServer JVM.

Compiler

The compiler translates the Java and SQLJ source files into Java class files, which consist of bytecodes. These bytecodes are then submitted to the interpreter when you invoke methods in the respective classes.

Bytecode interpreter and runtime system

The Java bytecode interpreter and runtime system executes the Java classes; this subsystem also contains the native precompiled Java class libraries.

Garbage collector

The garbage collector frees system resources when objects are no longer required.

RDBMS library manager

Loads your Java source, class, and resource files into the database.

RDBMS memory manager

Handles the allocation of memory when a Java program is run.

< BACKCONTINUE >

Index terms contained in this section

bytecode interpreter, JServer JVM
class loader, JServer JVM
compiler, JServer JVM
CORBA 2.0
EJB (Enterprise JavaBeans)
      JServer, support for
garbage collector, JServer JVM
Java class libraries
java command
Java Development Kit (JDK)
java.lang package
java.math package
java.util package
JDK (Java Development Kit)
JServer, deploying SQLJ in
      sessions
      understanding JServer
JVM (Java Virtual Machine)
Object Request Broker (ORB)
ORB (Object Request Broker)
RDBMS (Relational Database Management System)
      library manager, JServer JVM
      memory manager, JServer JVM
runtime system, JServer JVM



Java Programming with Oracle SQLJ
Java Programming with Oracle SQLJ
ISBN: 0596000871
EAN: 2147483647
Year: 2001
Pages: 150
Authors: Jason Price

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net