Skip Headers
Oracle® Database Java Developer's Guide
10
g
Release 1 (10.1)
Part Number B12021-01
Home
Book List
Index
Master Index
Feedback
Next
View PDF
Contents
Title and Copyright Information
Send Us Your Comments
Preface
Who Should Read This Book?
Organization
Java API Programming Models
Suggested Reading
Online Sources
Documentation Accessibility
1 Introduction to Java in Oracle Database
Chapter Contents
What's New in this Release?
Upgrading to J2SE 1.4.1
New Memory Model for Dedicated Mode Sessions
Database Web Services Callouts
Native Java Interface
EJB Call-out
Overview of Java
Java and Object-Oriented Programming Terminology
Class Hierarchy
Interfaces
Polymorphism
The Java Virtual Machine (JVM)
Key Features of the Java Language
Why Use Java in Oracle Database?
Java and the RDBMS: A Robust Combination
Multithreading
Automated Storage Management With Garbage Collection
Footprint
Performance
Dynamic Class Loading
What is Different With OracleJVM?
Main Components of the OracleJVM
Library Manager
Compiler
Interpreter
Class Loader
Verifier
Server-Side JDBC Internal Driver
Oracle's Java Application Strategy
Java Programming Environment
Java Stored Procedures
PL/SQL Integration and Oracle RDBMS Functionality
Development Tools
Desupport of J2EE Technologies in the Oracle Database
2 Java Applications on Oracle Database
Overview
Database Sessions Imposed on Java Applications
Java Supported APIs
Execution Control
Java Code, Binaries, and Resources Storage
Java Classes Loaded in the Database
Preparing Java Class Methods for Execution
Compiling Java Classes
Resolving Class Dependencies
Loading Classes
How to Grant Execute Rights
Controlling the Current User
Checking Java Uploads
Publishing
User Interfaces on the Server
Shortened Class Names
Class.forName() in Oracle Database
Supply the ClassLoader in Class.forName
Supply Class and Schema Names to classForNameAndSchema
Supply Class and Schema Names to lookupClass
Supply Class and Schema Names when Serializing
Class.forName Example
Managing Your Operating System Resources
Overview of Operating System Resources
Garbage Collection and Operating System Resources
Threading in Oracle Database
Thread Life Cycle
Special Considerations for Shared Servers
End-of-Call Migration
Operating System Resources Affected Across Calls
3 Invoking Java in the Database
Overview
Invoking Java Methods
Utilizing Java Stored Procedures
Utilizing Java Native Interface (JNI) Support
Utilizing JDBC for Querying the Database
An Example
Debugging Server Applications
How To Tell You Are Executing in the Server
Redirecting Output on the Server
Support for Calling Java Stored Procedures Directly
4 Java Installation and Configuration
Initializing a Java-Enabled Database
Oracle Database Template Configuration and Install
Modifying an Existing Oracle Database to Include OracleJVM
Configuring OracleJVM
Using The DBMS_JAVA Package
Enabling the Java Client
1. Install J2SE on the Client
2. Set up Environment Variables
3. Test Install with Samples
5 Developing Java Stored Procedures
Stored Procedures and Run-Time Contexts
Functions and Procedures
Database Triggers
Object-Relational Methods
Advantages of Stored Procedures
Performance
Productivity and Ease of Use
Scalability
Maintainability
Interoperability
Replication
Security
Java Stored Procedure Configuration
Java Stored Procedures Steps
6 Publishing Java Classes With Call Specs
Understanding Call Specs
Defining Call Specs: Basic Requirements
Setting Parameter Modes
Mapping Datatypes
Using the Server-Side Internal JDBC Driver
Writing Top-Level Call Specs
Writing Packaged Call Specs
Writing Object Type Call Specs
Declaring Attributes
Declaring Methods
7 Calling Stored Procedures
Calling Java from the Top Level
Redirecting Output
Calling Java from Database Triggers
Calling Java from SQL DML
Restrictions
Calling Java from PL/SQL
Calling PL/SQL from Java
How OracleJVM Handles Exceptions
8 Java Stored Procedures Application Example
Drawing the Entity-Relationship Diagram
Planning the Database Schema
Creating the Database Tables
Writing the Java Classes
Loading the Java Classes
Publishing the Java Classes
Calling the Java Stored Procedures
9 Security For Oracle Database Java Applications
Network Connection Security
Database Contents and OracleJVM Security
Java 2 Security
Setting Permissions
Debugging Permissions
Permission for Loading Classes
Database Authentication Mechanisms
10 Oracle Database Java Application Performance
Natively Compiled Code
Accelerator Overview
Oracle Database Core Java Class Libraries
Natively Compiling Java Application Class Libraries
Executing Accelerator
ncomp
Native Compilation Usage Scenarios
deploync
statusnc
Java Memory Usage
Configuring Memory Initialization Parameters
Java Pool Memory
Displaying Used Amounts of Java Pool Memory
Correcting Out of Memory Errors
11 Schema Object Tools
Schema Object Tool Overview
What and When to Load
Resolution
Digest Table
Compilation
loadjava
dropjava
ojvmjava
Shell Commands
12 Database Web Services
Database Web Services
Using the Database as Service Provider for Web Services
JPublisher Support for Web Services Call-Ins to the Database
Using the Database as Service Consumer for Web Services
Installation Requirements
JPublisher Generation Overview
Adjusting the Mapping of SQL Types
Using the Native Java Interface
A DBMS_JAVA Package
Glossary
Index