Skip to main content
Oracle Help Center

Sign Out

Sign In

  • Table of Contents
  • Search
  • Print
  • Download
  1. Database
  2. Oracle
  3. Oracle Database
  4. Release 19

Java Developer's Guide

  • Table of Contents
  • Search
  • Print
  • Download

Table of Contents

Expand AllCollapse All
  • List of Tables
  • Title and Copyright Information
  • Preface
    • Audience
    • Documentation Accessibility
    • Related Documents
    • Conventions
  • Changes in This Release for Oracle Database Java Developer's Guide
    • Changes in Oracle Database 19c
      • New Features
  • 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 Inheritance
        • 1.1.1.4 Interfaces
        • 1.1.1.5 Encapsulation
        • 1.1.1.6 Polymorphism
      • 1.1.2 Key Features of the Java Language
      • 1.1.3 Java Virtual Machine
      • 1.1.4 Java Class Hierarchy
    • 1.2 About Using Java in Oracle Database
      • 1.2.1 Java and RDBMS: A Robust Combination
      • 1.2.2 About Multithreading
      • 1.2.3 Memory Spaces Management
      • 1.2.4 Footprint
      • 1.2.5 Performance of an Oracle JVM
      • 1.2.6 Dynamic Class Loading
    • 1.3 Overview of Oracle JVM
      • 1.3.1 Process Area
      • 1.3.2 Java session initialization, duration and entrypoints
      • 1.3.3 The GUI
      • 1.3.4 The IDE
    • 1.4 Feature List of Oracle JVM
    • 1.5 Main Components of Oracle JVM
      • 1.5.1 Library Manager
      • 1.5.2 Compiler
      • 1.5.3 Interpreter
      • 1.5.4 Class Loader
      • 1.5.5 Verifier
      • 1.5.6 Server-Side JDBC Internal Driver
      • 1.5.7 Server-Side SQLJ Translator
      • 1.5.8 System Classes
    • 1.6 Java Programming in Oracle Database
      • 1.6.1 Java in Database Application Development
      • 1.6.2 Java Programming Environment Usage
      • 1.6.3 Java Stored Procedures
      • 1.6.4 PL/SQL Integration and Oracle RDBMS Functionality
        • 1.6.4.1 JDBC Drivers
        • 1.6.4.2 SQLJ
      • 1.6.5 Development Tools
      • 1.6.6 Internet Protocol Version 6 Support
    • 1.7 Support for Java 8
    • 1.8 Memory Model for Dedicated Mode Sessions
  • 2 Java Applications on Oracle Database
    • 2.1 Database Sessions Imposed on Java Applications
    • 2.2 Execution Control of Java Applications
    • 2.3 Java Code, Binaries, and Resources Storage
    • 2.4 About Java Classes Loaded in the Database
    • 2.5 Preparing Java Class Methods for Execution
      • 2.5.1 Compiling Java Classes
        • 2.5.1.1 Compiling Source Through javac
        • 2.5.1.2 Compiling Source Through the loadjava Tool
        • 2.5.1.3 Compiling Source at Run Time
        • 2.5.1.4 Specifying Compiler Options
          • 2.5.1.4.1 Specifying Default Compiler Options
          • 2.5.1.4.2 Specifying Compiler Options on the Command Line
          • 2.5.1.4.3 Specifying Compiler Options Specified in a Database Table
          • 2.5.1.4.4 Details About Specifying Compiler Options Specified in the Database Table
        • 2.5.1.5 Recompiling Source Programs Automatically
      • 2.5.2 Overview of Resolving Class Dependencies
        • 2.5.2.1 Allowing References to Nonexistent Classes
        • 2.5.2.2 Bytecode Verifier
      • 2.5.3 Logging in Oracle JVM
      • 2.5.4 Overview of Loading Classes Using the loadjava Tool
        • 2.5.4.1 About Sharing of Metadata for User Classloaded Classes
        • 2.5.4.2 Defining the Same Class Twice
        • 2.5.4.3 About Designating Database Privileges and JVM Permissions
        • 2.5.4.4 About Loading JAR or ZIP Files
        • 2.5.4.5 Database Resident JARs
      • 2.5.5 Overview of Granting Execute Rights
      • 2.5.6 Overview of Controlling the Current User
      • 2.5.7 Overview of Checking Java Uploads
      • 2.5.8 About Publishing Java Methods Loaded in the Database
      • 2.5.9 Overview of Auditing Java Classes Loaded in the Database
    • 2.6 User Interfaces on the Server
    • 2.7 Shortened Class Names
    • 2.8 Class.forName() in Oracle Database
      • 2.8.1 Supply ClassLoader in Class.forName()
      • 2.8.2 Supply Class and Schema Names to classForNameAndSchema()
      • 2.8.3 Supply Class and Schema Names to lookupClass()
      • 2.8.4 Supply Class and Schema Names when Serializing
      • 2.8.5 Class.forName Example
    • 2.9 About Managing Your Operating System Resources
      • 2.9.1 Overview of Operating System Resources
      • 2.9.2 Garbage Collection and Operating System Resources
    • 2.10 About Using the Runtime.exec Functionality in Oracle Database
    • 2.11 Managing Your Applications Using JMX
      • 2.11.1 Overview of JMX
      • 2.11.2 Enabling and Starting JMX in a Session
      • 2.11.3 Setting Oracle JVM JMX Defaults and Configurability
      • 2.11.4 Examples of SQL calls to dbms_java.start_jmx_agent
      • 2.11.5 Using JConsole to Monitor and Control Oracle JVM
        • 2.11.5.1 Using the jconsole Command
        • 2.11.5.2 About Using the JConsole interface
        • 2.11.5.3 About Viewing Oracle JVM Summary Information
        • 2.11.5.4 About Monitoring Memory Consumption
        • 2.11.5.5 About Monitoring Thread Use
        • 2.11.5.6 About Monitoring Class Loading
        • 2.11.5.7 About Monitoring and Managing MBeans
        • 2.11.5.8 About Viewing VM Information
        • 2.11.5.9 The OracleRuntime MBean
        • 2.11.5.10 Memory Thresholds
      • 2.11.6 Important Security Notes
      • 2.11.7 Shared Server Limitations for JMX
    • 2.12 Overview of Threading in Oracle Database
      • 2.12.1 Thread Life Cycle
      • 2.12.2 System.exit(), OracleRuntime.exitSession(), and OracleRuntime.exitCall()
    • 2.13 Shared Servers Considerations
      • 2.13.1 End-of-Call Migration
      • 2.13.2 Oracle-Specific Support for End-of-Call Optimization
      • 2.13.3 The EndOfCallRegistry.registerCallback() Method
      • 2.13.4 The EndOfCallRegistry.runCallbacks() Method
      • 2.13.5 The Callback Interface
      • 2.13.6 The Callback.act() method
      • 2.13.7 Operating System Resources Affected Across Calls
  • 3 Calling Java Methods in Oracle Database
    • 3.1 Invoking Java Methods
      • 3.1.1 Using PL/SQL Wrappers
      • 3.1.2 About JNI Support
      • 3.1.3 About Utilizing SQLJ and JDBC with Java in the Database
        • 3.1.3.1 Using JDBC
        • 3.1.3.2 Using SQLJ
        • 3.1.3.3 Example Comparing JDBC and SQLJ
        • 3.1.3.4 SQLJ Strong Typing Paradigm
        • 3.1.3.5 Translating a SQLJ Program
        • 3.1.3.6 Interaction with PL/SQL
      • 3.1.4 About Using the Command-Line Interface
      • 3.1.5 Overview of Using the Client-Side Stub
        • 3.1.5.1 Using the Default Service Feature
        • 3.1.5.2 Testing the Default Service with a Basic Configuration
    • 3.2 How To Tell Whether You Are Running on the Server
    • 3.3 About Redirecting Output on the Server
  • 4 Java Installation and Configuration
    • 4.1 Initializing a Java-Enabled Database
      • 4.1.1 Configuring the Oracle JVM Option within the Oracle Database Template
      • 4.1.2 Modifying an Existing Oracle Database to Include Oracle JVM
    • 4.2 Configuring Oracle JVM
    • 4.3 The DBMS_JAVA Package
    • 4.4 Enabling the Java Client
      • 4.4.1 Installing Java SE on the Client
      • 4.4.2 Setting Up Environment Variables
    • 4.5 Two-Tier Duration for Java Session State
    • 4.6 About Setting System Properties
  • 5 Introduction to Nashorn JavaScript Engine
    • 5.1 About Using Nashorn JavaScript Engine
      • 5.1.1 Loading JavaScript Code into a Schema
      • 5.1.2 How to run JavaScript in Oracle JVM
        • 5.1.2.1 Using the DBMS_JAVASCRIPT.RUN PL/SQL Procedure
        • 5.1.2.2 Using the DbmsJavaScript Java Class
        • 5.1.2.3 Using the Standard javax.script Java Package
    • 5.2 JavaScript Data Access using JDBC
    • 5.3 REST Enable Your JavaScript Application
  • 6 Developing Java Stored Procedures
    • 6.1 Stored Procedures and Run-Time Contexts
      • 6.1.1 Functions and Procedures
      • 6.1.2 Database Triggers
      • 6.1.3 Object-Relational Methods
    • 6.2 Advantages of Stored Procedures
      • 6.2.1 Performance
      • 6.2.2 Productivity and Ease of Use
      • 6.2.3 Scalability
      • 6.2.4 Maintainability
      • 6.2.5 Interoperability
      • 6.2.6 Replication
      • 6.2.7 Security
    • 6.3 Running Java Stored Procedures
      • 6.3.1 Creating or Reusing the Java Classes
      • 6.3.2 Loading and Resolving the Java Classes
      • 6.3.3 Publishing the Java Classes
      • 6.3.4 Calling the Stored Procedures
    • 6.4 Debugging Java Stored Procedures
      • 6.4.1 Prerequisites for Debugging Java Stored Procedures
      • 6.4.2 Debugging Java Stored Procedures Using the jdb Debugger
      • 6.4.3 Debugging Java Stored Procedures Using JDeveloper
  • 7 Publishing Java Classes With Call Specifications
    • 7.1 What Are Call Specifications?
    • 7.2 Defining Call Specifications
      • 7.2.1 About Setting Parameter Modes
      • 7.2.2 About Mapping Data Types
      • 7.2.3 Using the Server-Side Internal JDBC Driver
    • 7.3 Writing Top-Level Call Specifications
      • 7.3.1 Examples
    • 7.4 Writing Packaged Call Specifications
    • 7.5 Writing Object Type Call Specifications
      • 7.5.1 About Attributes
      • 7.5.2 Declaring Methods
        • 7.5.2.1 Map and Order Methods
        • 7.5.2.2 Constructor Methods
        • 7.5.2.3 Examples
  • 8 Calling Stored Procedures
    • 8.1 Calling Java from the Top Level
      • 8.1.1 Redirecting the Output
      • 8.1.2 Examples of Calling Java Stored Procedures From the Top Level
    • 8.2 Calling Java from Database Triggers
    • 8.3 Calling Java from SQL DML
    • 8.4 Calling Java from PL/SQL
    • 8.5 Calling PL/SQL from Java
    • 8.6 How Oracle JVM Handles Exceptions
  • 9 Java Stored Procedures Application Example
    • 9.1 About Planning the Database Schema
    • 9.2 Creating the Database Tables
    • 9.3 Writing the Java Classes
    • 9.4 Loading the Java Classes
    • 9.5 Publishing the Java Classes
    • 9.6 Calling the Java Stored Procedures
  • 10 Oracle Database Java Application Performance
    • 10.1 Oracle JVM Just-in-Time Compiler (JIT)
      • 10.1.1 Overview of Oracle JVM JIT
      • 10.1.2 Advantages of JIT Compilation
      • 10.1.3 Methods Introduced in Oracle Database 11g
    • 10.2 About Java Memory Usage
      • 10.2.1 Configuring Memory Initialization Parameters
        • 10.2.1.1 Initializing Pool Sizes within Database Templates
      • 10.2.2 About Java Pool Memory
      • 10.2.3 Displaying Used Amounts of Java Pool Memory
      • 10.2.4 Correcting Out of Memory Errors
      • 10.2.5 Displaying Java Call and Session Heap Statistics
  • 11 Security for Oracle Database Java Applications
    • 11.1 Network Connection Security
    • 11.2 Database Contents and Oracle JVM Security
      • 11.2.1 Overview of Java 2 Security Features
      • 11.2.2 Overview of Setting Permissions
        • 11.2.2.1 Fine-Grain Definition for Each Permission
          • 11.2.2.1.1 Granting and Limiting Permissions
          • 11.2.2.1.2 Acquiring Administrative Permission to Update Policy Table
          • 11.2.2.1.3 Creating Permissions
          • 11.2.2.1.4 Enabling or Disabling Permissions
          • 11.2.2.1.5 About Permission Types
          • 11.2.2.1.6 About Initial Permission Grants
        • 11.2.2.2 Assigning General Permission Definition to Roles
      • 11.2.3 Debugging Permissions
      • 11.2.4 Permission for Loading Classes
      • 11.2.5 Customizing the Default java.security Resource
    • 11.3 Database Authentication Mechanisms Available with Oracle JVM
    • 11.4 Secure Use of Runtime.exec Functionality in Oracle Database
  • 12 Native Oracle JVM Support for JNDI
    • 12.1 Overview of Oracle JVM Support for JNDI
    • 12.2 Requirements for Oracle JVM Support for JNDI
      • 12.2.1 Namespace
        • 12.2.1.1 Object permissions
        • 12.2.1.2 Persistent Storage Tables, Indexes, and Sequences
        • 12.2.1.3 Initial Contexts and Permissions
        • 12.2.1.4 Object and Context Default Permissions
      • 12.2.2 Oracle Java Directory Service JNDI Name Space Provider
        • 12.2.2.1 Directory Context
        • 12.2.2.2 StateFactories
        • 12.2.2.3 ObjectFactories
        • 12.2.2.4 OJDS URL Support
        • 12.2.2.5 Client classpath
      • 12.2.3 Namespace Browser
    • 12.3 OJDS Command-Line Tools
      • 12.3.1 ls Command
      • 12.3.2 cd Command
      • 12.3.3 pwd Command
      • 12.3.4 chown Command
      • 12.3.5 mkdir Command
      • 12.3.6 rm Command
      • 12.3.7 ln Command
      • 12.3.8 mv Command
      • 12.3.9 chmod Command
      • 12.3.10 bind Command
      • 12.3.11 bindds Command
      • 12.3.12 bindurl Command
    • 12.4 OJDS APIs and Classes
      • 12.4.1 oracle.aurora.jndi.ojds.OjdsClientContext
      • 12.4.2 oracle.aurora.jndi.ojds.OjdsServerContext
      • 12.4.3 oracle.aurora.jndi.ojds.OjdsInitialContextFactory
      • 12.4.4 oracle.aurora.jndi.ojds.OjdsURLContextFactory
      • 12.4.5 oracle.aurora.jndi.ojds.OjdsURLContext
  • 13 Schema Objects and Oracle JVM Utilities
    • 13.1 Overview of Schema Objects
    • 13.2 What and When to Load
    • 13.3 Resolution of Schema Objects
    • 13.4 Compilation of Schema Objects
    • 13.5 The ojvmtc Tool
      • 13.5.1 About the ojvmtc Tool
      • 13.5.2 Arguments of ojvmtc Command
    • 13.6 The loadjava Tool
      • 13.6.1 loadjava Tool Syntax
      • 13.6.2 loadjava Tool Argument Summary
      • 13.6.3 loadjava Tool Argument Details
    • 13.7 The dropjava Tool
      • 13.7.1 dropjava Tool Syntax
      • 13.7.2 dropjava Tool Argument Summary
      • 13.7.3 dropjava Tool Argument Details
      • 13.7.4 About Dropping Resources Using dropjava Tool
    • 13.8 The ojvmjava Tool
      • 13.8.1 ojvmjava Tool Syntax
      • 13.8.2 ojvmjava Tool Argument Summary
      • 13.8.3 ojvmjava Tool Example
      • 13.8.4 ojvmjava Tool Functionality
        • 13.8.4.1 ojvmjava Tool Command-Line Options
        • 13.8.4.2 ojvmjava Tool Shell Commands
  • 14 Database Web Services
    • 14.1 Overview of Database Web Services
    • 14.2 About Using Oracle Database as Web Services Consumer
      • 14.2.1 About Using Oracle JVM Web Services Call-Out Utility
        • 14.2.1.1 Architecture of Oracle JVM Web Services Call-Out Utility
        • 14.2.1.2 Input to Oracle JVM Web Services Call-Out Utility
        • 14.2.1.3 Output of the Oracle JVM Web Services Call-Out Utility
        • 14.2.1.4 Calling Secure Web Service from Oracle JVM Web Services Call-Out Utility
      • 14.2.2 Web Service Data Sources (Virtual Table Support)
      • 14.2.3 Features of Oracle Database as a Web Service Consumer
  • 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 export_source
    • A.11 export_class
    • A.12 export_resource
    • A.13 loadjava
    • A.14 dropjava
    • A.15 grant_permission
    • A.16 grant_permission
    • A.17 restrict_permission
    • A.18 restrict_permission
    • A.19 grant_policy_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
    • A.26 runjava
    • A.27 runjava_in_current_session
    • A.28 set_property
    • A.29 get_property
    • A.30 remove_property
    • A.31 show_property
    • A.32 set_output_to_sql
    • A.33 remove_output_to_sql
    • A.34 enable_output_to_sql
    • A.35 disable_output_to_sql
    • A.36 query_output_to_sql
    • A.37 set_output_to_java
    • A.38 remove_output_to_java
    • A.39 enable_output_to_java
    • A.40 disable_output_to_java
    • A.41 query_output_to_java
    • A.42 set_output_to_file
    • A.43 remove_output_to_file
    • A.44 enable_output_to_file
    • A.45 disable_output_to_file
    • A.46 query_output_to_file
    • A.47 enable_output_to_trc
    • A.48 disable_output_to_trc
    • A.49 query_output_to_trc
    • A.50 endsession
    • A.51 endsession_and_related_state
    • A.52 set_native_compiler_option
    • A.53 unset_native_compiler_option
    • A.54 compile_class
    • A.55 uncompile_class
    • A.56 compile_method
    • A.57 uncompile_method
    • A.58 start_jmx_agent
    • A.59 set_runtime_exec_credentials
  • B DBMS_JAVASCRIPT Package
    • B.1 DBMS_JAVASCRIPT Overview
      • B.1.1 The RUN Procedure
    • B.2 DBMS_JAVASCRIPT Security Model
  • C Classpath Extensions and User Classloaded Metadata
    • C.1 Classpath Extensions
      • C.1.1 jserverQuotedClassPathTermPrefix
      • C.1.2 jserverURLPrefix
      • C.1.3 jserverSpecialTokenPrefix
      • C.1.4 JSERVER_CP
      • C.1.5 JSERVER_SCHEMAc
      • C.1.6 jserver:/CP general syntax
    • C.2 User Classloaded Metadata
  • Index

Search

Print

Download

PDF for offline and print

  • Previous
  • Next
  1. Java Developer's Guide
  2. Database Web Services

14 Database Web Services

This chapter provides an overview of database Web services and discusses how to call existing Web services. This chapter contains the following sections:

  • Overview of Database Web Services

  • About Using Oracle Database as Web Services Consumer

  • Previous
  • Next
Back to main content
  • About Oracle
  • Contact Us
  • Legal Notices
  • Terms of Use
  • Your Privacy Rights
Copyright © 1999, 2019, Oracle and/or its affiliates. All rights reserved.
  • Previous
  • Next
Video