If you are looking for a way to extend stored programs with Java, look no further. This article, the first of two parts, is excerpted from chapter five of Expert Oracle PL/SQL, written by Ron Hardman and Michael McLaughlin (McGraw-Hill/Osborne, 2005; ISBN: 0072261943).
Extending stored programs with Java is a very popular solution. PL/SQL is essential to the process of stored Java class libraries. PL/SQL wraps access to the Java class libraries, which means PL/SQL becomes the gate through which data moves to and from Java stored objects.
This chapter stands independent of others in the book since all its content works in currently supported versions of the Oracle database. We’ll be covering the following topics:
Java architecture in Oracle
Oracle JDBC connection types
Client-side driver, or JDBC thin driver
Oracle call interface driver, or middle-tier thick driver
Oracle server-side internal driver, or server-tier thick driver
Building Java class libraries in Oracle
Building internal server Java functions
Building internal server Java procedures
Building internal server Java objects
Troubleshooting Java class library build, load, drop, and use
Mapping Oracle types
This chapter introduces you to the big picture of thehows small boxes ne Oracle Java architecture. After explaining the architecture, you’ll see how to develop and extend Java components as application programming components.
Why Would I Use This?
We’ll use PL/SQL to interface between stored Java class libraries and other PL/SQL stored and anonymous block programs. We’ll also map native and user-defined data types between Oracle and Java to write effective interfaces and support external Java Server Pages (JSPs).