Who Should Read This Book?
This book has been written for the following audiences:
- Management--You may have purchased Oracle Database for reasons other than Java development within the database. However, if you want to know more about Oracle Database Java features, see "Oracle's Java Application Strategy" for a management perspective.
- Non-Java Developers--Oracle database programming consists of PL/SQL and other non-Java programming. For experienced PL/SQL developers who are not familiar with Java, a brief overview of Java and object-oriented concepts is discussed in the first part of Chapter 1, "Introduction to Java in Oracle Database". For more detailed information on Java, see "Suggested Reading" at the end of this Preface.
- Java Developers--Pure Java developers are used to a Java environment that follows the Sun Microsystems specification. However, when Java is combined in the database, both Java and database concepts merge. Thus, the Java environment within Oracle Database is expanded to include database concerns. The bulk of this book discusses how to execute Java in the database. The following outlines the two viewpoints that arise from this merge:
- Java environment--Note that Oracle Database delivers a compliant Java implementation--any 100% pure Java code will work. OracleJVM affects your Java development in the way you manage your classes, and the environment in which your classes exist. For example, the classes must be loaded into the database. In addition, there is a clearer separation of client and server in the Oracle Database model.
- Database environment--You need to be aware of database concepts for managing your Java objects. This book gives you a comprehensive view of how the two well-defined realms--the Oracle Database database and the Java environment--fit together. For example, when deciding on your security policies, you must consider both database security and Java security for a comprehensive security policy.
This document contains the following chapters:
Gives an overview of how to develop, load, and execute Java applications in the database.
Describes the basic differences for writing, installing, and deploying Java applications within Oracle Database.
Gives an overview and examples of how to invoke Java within the database.
Describes what you need to know to install and configure OracleJVM within your database.
Describes stored procedures, which open the Oracle RDBMS to all Java programmers.
Describes how to publish the methods with call specifications (call specs), which map Java method names, parameter types, and return types to their SQL counterparts.
Demonstrates how to call Java stored procedures in various contexts.
Demonstrates the building of a Java stored procedures application.
Details the security support available for Java applications within Oracle Database.
Describes how to increase Java application performance with natively compiled code Java memory usage.
Describes the schema object tools to use in the Oracle Database Java environment.
Describes Database Web Services and Web Services callouts.
Describes the DBMS_JAVA package.
Defines specialized terms.
Java API Programming Models
The building blocks that Java developers use in Oracle Database are as follows:
- Java stored procedures--You can develop Java applications that are stored in the database. Once loaded, these procedures can be invoked from SQL, PL/SQL, or as triggers. See Chapter 5, "Developing Java Stored Procedures" for more information.
- JDBC--You can write a Java application that accesses SQL data from the client, or directly on the server.
Each of these models is briefly discussed in Chapter 1, "Introduction to Java in Oracle Database" and examples are given in Chapter 3, "Invoking Java in the Database". Both of these chapters should help you decide which model to use for your particular application. Once you decide on the appropriate model, examine the appropriate developer's guide for in-depth information on each model.
- The Java Programming Language by Arnold & Gosling, Addison-Wesley
- Coauthored by the originator of Java, this definitive book explains the basic concepts, areas of applicability, and design philosophy of the language. Using numerous examples, it progresses systematically from basic to advanced programming techniques.
- Thinking in Java by Bruce Eckel, Prentice Hall
- This book offers a complete introduction to Java on a level appropriate for both beginners and experts. Using simple examples, it presents the fundamentals and complexities of Java in a straightforward, good-humored way.
- Core Java by Cornell & Horstmann, Prentice-Hall
- This book is a complete, step-by-step introduction to Java programming principles and techniques. Using real-world examples, it highlights alternative approaches to program design and offers many programming tips and tricks.
- Java in a Nutshell by Flanagan, O'Reilly
- This indispensable quick reference provides a wealth of information about Java's most commonly used features. It includes programming tips and traps, excellent examples of problem solving, and tutorials on important features.
- Java Software Solutions by Lewis & Loftus, Addison-Wesley
- This book provides a clear, thorough introduction to Java and object-oriented programming. It contains extensive reference material and excellent pedagogy including self-assessment questions, programming projects, and exercises that encourage experimentation.
There are many useful online sources of information about Java. For example, you can view or download documentation, guides, and tutorials from the JavaSoft Web site:
Another popular Java Web site is:
Also, the following Internet news groups are dedicated to Java:
You can get the latest OracleJVM news, updates, and offerings from the Oracle Technology Network (OTN) at the following site:
In addition to try-and-buy tools, you can download JDBC drivers, SQLJ reference implementations, white papers on Java application development, and collections of frequently asked questions (FAQs).
To download free release notes, installation documentation, white papers, or other collateral, please visit OTN. You must register online before using OTN; registration is free and can be done at
If you already have a user name and password for OTN, then you can go directly to the documentation section of the OTN Web site at
Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at
Accessibility of Code Examples in Documentation
JAWS, a Windows screen reader, may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, JAWS may not always read a line of text that consists solely of a bracket or brace.
Accessibility of Links to External Web Sites in Documentation
This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.