Oracle8i Java Developer's Guide Release 3 (8.1.7) Part Number A83728-01 |
|
In incorporating Java within the Oracle8i database, your Java application exists within the context of a database session. JServer sessions are entirely analogous to traditional Oracle sessions. Each JServer session maintains the client's Java state across calls within the session.
As demonstrated in Figure 2-1, each Java client starts up a database session as the environment for executing Java within the database. Garbage collection, session memory, and call memory exist solely for each client within its session.
Within the context of a session, the client performs the following:
Within a single session, the client has its own Java environment, which is separate from every other client's environment. It appears to the client as if a separate, individual JVM was invoked for each session, although the implementation is vastly more efficient than this seems to imply. Within a session, the Aurora JVM manages the scalability for you within the database. Every call executed from a single client is managed within its own session--separately from other clients. The Aurora JVM maximizes sharing read-only data between clients and emphasizes a minimum amount of per-session incremental footprint to maximize performance for multiple clients.
The underlying server environment hides the details associated with session, network, state, and other shared resource management issues from Java server code. Static variables are all local to the client. No client can access another client's static variables, because the memory is not available across session boundaries. Each client executes its calls within its own session, so each client's activities are separate from any other client. During a call, you can store objects in static fields of different classes, and you can expect this state to be available for your next call. The entire state of your Java program is private to you and exists for your entire session.
The Aurora JVM manages the following within the session:
When you connect to Oracle8i, you start a database session. A session ends when one of the following events occurs:
oracle.aurora.mts.session.Session.THIS_SESSION().endSession()
method.
For the current Oracle8i release, we offer five Java APIs--Java stored procedures, Servlets, JavaServer Pages, CORBA distributed objects, and Enterprise JavaBeans (EJBs).
In addition, you can access SQL data through SQLJ or JDBC. See Chapter 3, "Invoking Java in the Database" for examples of each Java API.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|