Skip Headers
Oracle® Database Java Developer's Guide
10g Release 2 (10.2)

Part Number B14187-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to next page
Next
View PDF

Contents

List of Examples

List of Figures

List of Tables

Title and Copyright Information

Send Us Your Comments

Preface

Intended Audience
Documentation Accessibility
Structure
Related Documents
Conventions

1 Introduction to Java in Oracle Database

1.1 Overview of Java
1.1.1 Java and Object-Oriented Programming Terminology
1.1.1.1 Classes
1.1.1.2 Objects
1.1.1.3 Interfaces
1.1.1.4 Encapsulation
1.1.1.5 Inheritance
1.1.1.6 Polymorphism
1.1.2 Key Features of the Java Language
1.1.3 The JVM
1.1.4 Java Class Hierarchy
1.2 Using Java in Oracle Database
1.2.1 Java and RDBMS: A Robust Combination
1.2.2 Multithreading
1.2.3 Automated Storage Management With Garbage Collection
1.2.4 Footprint
1.2.5 Performance
1.2.6 Dynamic Class Loading
1.3 The Oracle JVM
1.3.1 Process Area
1.3.2 The main() Method
1.3.3 The GUI
1.3.4 The IDE
1.4 Main Components of the Oracle JVM
1.4.1 Library Manager
1.4.2 Compiler
1.4.3 Interpreter
1.4.4 Class Loader
1.4.5 Verifier
1.4.6 Server-Side JDBC Internal Driver
1.4.7 Server-Side SQLJ Translator
1.5 Java Application Strategy of Oracle
1.5.1 Java in Database Application Development
1.5.2 Java Programming Environment
1.5.3 Java Stored Procedures
1.5.4 PL/SQL Integration and Oracle RDBMS Functionality
1.5.4.1 JDBC Drivers
1.5.4.2 SQLJ
1.5.4.3 JPublisher
1.5.5 Development Tools
1.6 Desupport of J2EE Technologies in the Oracle Database
1.7 Memory Model for Dedicated Mode Sessions
1.8 What's New in this Release?
1.8.1 Upgrading to J2SE 1.4.2
1.8.2 Auditing SQL Statements Related to Java Schema Objects
1.8.3 The PGA_AGGREGATE_TARGET parameter

2 Java Applications on Oracle Database

2.1 Database Sessions Imposed on Java Applications
2.2 Execution Control
2.3 Java Code, Binaries, and Resources Storage
2.4 Preparing Java Class Methods for Execution
2.4.1 Compiling Java Classes
2.4.1.1 Compiling Source Through javac
2.4.1.2 Compiling Source Through loadjava
2.4.1.3 Compiling Source at Run Time
2.4.1.4 Specifying Compiler Options
2.4.1.5 Recompiling Automatically
2.4.2 Resolving Class Dependencies
2.4.3 Loading Classes
2.4.4 Granting Execute Rights
2.4.5 Controlling the Current User
2.4.6 Checking Java Uploads
2.4.7 Publishing
2.4.8 Auditing
2.5 User Interfaces on the Server
2.6 Shortened Class Names
2.7 Class.forName() in Oracle Database
2.7.1 Supply ClassLoader in Class.forName()
2.7.2 Supply Class and Schema Names to classForNameAndSchema()
2.7.3 Supply Class and Schema Names to lookupClass()
2.7.4 Supply Class and Schema Names when Serializing
2.7.5 Class.forName Example
2.8 Managing Your Operating System Resources
2.8.1 Overview of Operating System Resources
2.8.2 Garbage Collection and Operating System Resources
2.9 Threading in Oracle Database
2.10 Shared Servers Considerations
2.10.1 End-of-Call Migration
2.10.2 Oracle-Specific Support for End-of-Call Optimization
2.10.3 The EndOfCallRegistry.registerCallback() Method
2.10.4 The EndOfCallRegistry.runCallbacks() Method
2.10.5 The Callback Interface
2.10.6 The Callback.act() method
2.10.7 Operating System Resources Affected Across Calls

3 Calling Java Methods in Oracle Database

3.1 Invoking Java Methods
3.1.1 Utilizing Java Stored Procedures
3.1.2 Utilizing JNI Support
3.1.3 Utilizing SQLJ and JDBC for Querying the Database
3.1.3.1 JDBC
3.1.3.2 SQLJ
3.1.3.3 Example Comparing JDBC and SQLJ
3.1.3.4 Complete SQLJ Example
3.1.3.5 SQLJ Strong Typing Paradigm
3.1.3.6 Translating a SQLJ Program
3.1.3.7 Running a SQLJ Program in the Server
3.1.3.8 Converting a Client Application to Run on the Server
3.1.3.9 Interacting with PL/SQL
3.2 Debugging Server Applications
3.3 How To Tell You Are Running on the Server
3.4 Redirecting Output on the Server
3.5 Support for Calling Java Stored Procedures Directly
3.5.1 Using the Native Java Interface

4 Java Installation and Configuration

4.1 Initializing a Java-Enabled Database
4.1.1 Configuring with Oracle Database Template
4.1.2 Modifying an Existing Oracle Database to Include Oracle JVM
4.2 Configuring Oracle JVM
4.3 Using The DBMS_JAVA Package
4.4 Enabling the Java Client
4.4.1 Install J2SE on the Client
4.4.2 Set Up Environment Variables
4.4.3 Test Install with Samples

5 Developing Java Stored Procedures

5.1 Stored Procedures and Run-Time Contexts
5.1.1 Functions and Procedures
5.1.2 Database Triggers
5.1.3 Object-Relational Methods
5.2 Advantages of Stored Procedures
5.2.1 Performance
5.2.2 Productivity and Ease of Use
5.2.3 Scalability
5.2.4 Maintainability
5.2.5 Interoperability
5.2.6 Replication
5.2.7 Security
5.3 Java Stored Procedure Configuration
5.4 Java Stored Procedures Steps
5.4.1 Step 1: Create or Reuse the Java Classes
5.4.2 Step 2: Load and Resolve the Java Classes
5.4.3 Step 3: Publish the Java Classes
5.4.4 Step 4: Call the Stored Procedures
5.4.5 Step 5: Debug the Stored Procedures, if Necessary

6 Publishing Java Classes With Call Specifications

6.1 Understanding Call Specifications
6.2 Defining Call Specifications
6.2.1 Setting Parameter Modes
6.2.2 Mapping Data Types
6.2.3 Using the Server-Side Internal JDBC Driver
6.3 Writing Top-Level Call Specifications
6.4 Writing Packaged Call Specifications
6.5 Writing Object Type Call Specifications
6.5.1 Declaring Attributes
6.5.2 Declaring Methods
6.5.2.1 Map and Order Methods
6.5.2.2 Constructor Methods
6.5.2.3 Examples

7 Calling Stored Procedures

7.1 Calling Java from the Top Level
7.1.1 Redirecting Output
7.1.2 Examples of Calling Java Stored Procedures From the Top Level
7.2 Calling Java from Database Triggers
7.3 Calling Java from SQL DML
7.4 Calling Java from PL/SQL
7.5 Calling PL/SQL from Java
7.6 How Oracle JVM Handles Exceptions

8 Java Stored Procedures Application Example

8.1 Drawing the Entity-Relationship Diagram
8.2 Planning the Database Schema
8.3 Creating the Database Tables
8.4 Writing the Java Classes
8.5 Loading the Java Classes
8.6 Publishing the Java Classes
8.7 Calling the Java Stored Procedures

9 Security for Oracle Database Java Applications

9.1 Network Connection Security
9.2 Database Contents and Oracle JVM Security
9.2.1 Java2 Security
9.2.2 Setting Permissions
9.2.2.1 Fine-Grain Definition for Each Permission
9.2.2.2 General Permission Definition Assigned to Roles
9.2.3 Debugging Permissions
9.2.4 Permission for Loading Classes
9.3 Database Authentication Mechanisms

10 Oracle Database Java Application Performance

10.1 Natively Compiled Code
10.1.1 Accelerator Overview
10.1.2 Oracle Database Core Java Class Libraries
10.1.3 Natively Compiling Java Application Class Libraries
10.1.4 Running the Accelerator
10.1.5 The ncomp Tool
10.1.6 Native Compilation Usage Scenarios
10.1.7 The deploync Tool
10.1.8 The statusnc Tool
10.2 Java Memory Usage
10.2.1 Configuring Memory Initialization Parameters
10.2.1.1 Initializing Pool Sizes within Database Templates
10.2.2 Java Pool Memory
10.2.3 Displaying Used Amounts of Java Pool Memory
10.2.4 Correcting Out of Memory Errors

11 Schema Objects and Oracle JVM Utilities

11.1 Schema Objects Overview
11.2 What and When to Load
11.3 Resolution
11.4 Digest Table
11.5 Compilation
11.6 The loadjava Tool
11.6.1 Syntax
11.6.2 Argument Summary
11.6.3 Argument Details
11.7 The dropjava Tool
11.7.1 Syntax
11.7.2 Argument Summary
11.7.3 Argument Details
11.7.4 Dropping Resources
11.8 The ojvmjava Tool
11.8.1 Syntax
11.8.2 Argument Summary
11.8.3 Example
11.8.4 Functionality
11.8.4.1 ojvmjava Options
11.8.4.2 Shell Commands

12 Database Web Services

12.1 Overview of Database Web Services
12.2 Using Oracle Database as Service Provider for Web Services
12.2.1 How to Use JPublisher for Web Services Call-Ins
12.2.2 Features of Oracle Database as a Web Service Provider
12.2.3 JPublisher Support for Web Services Call-Ins to Oracle Database
12.3 Using Oracle Database as Service Consumer for Web Services
12.3.1 How to Use Oracle Database for Web Services Call-Outs
12.3.2 Web Service Data Sources (Virtual Table Support)
12.3.3 Features of Oracle Database as a Web Service Consumer
12.3.4 JPublisher Generation Overview
12.3.5 Adjusting the Mapping of SQL Types

A DBMS_JAVA Package

A.1 longname
A.2 shortname
A.3 get_compiler_option
A.4 set_compiler_option
A.5 reset_compiler_option
A.6 resolver
A.7 derivedFrom
A.8 fixed_in_instance
A.9 set_output
A.10 start_debugging
A.11 stop_debugging
A.12 restart_debugging
A.13 export_source
A.14 export_class
A.15 export_resource
A.16 loadjava
A.17 dropjava
A.18 grant_permission
A.19 restrict_permission
A.20 grant_policy_permission
A.21 revoke_permission
A.22 disable_permission
A.23 enable_permission
A.24 delete_permission
A.25 set_preference

Index