Java Stored Procedures

Since Oracle 8i, Oracle has included a Java Virtual Machine (JVM) inside the database. In Oracle 9i Release 2, the JVM supports JDK 1.3 and conforms fully to the Java Language Specification. Having a JVM inside the database allows Java methods to run inside the database. To do this, we need to write a PL/SQL function or procedure call specification that, instead of including an implementation in PL/SQL, includes a LANGUAGE JAVA clause that maps a Java method's parameters and return types to PL/SQL types.

There are few restrictions on what a Java method can do when it runs inside the database—the most obvious one being that we can't have a user interface. For example, standard input (from the keyboard) and standard output ...

Get Java™ Oracle® Database Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.