O'Reilly logo

Oracle PL/SQL Programming, Third Edition by Bill Pribyl, Steven Feuerstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using DBMS_ JAVA

The Oracle built-in package DBMS_JAVA gives you access to and the ability to modify various characteristics of the Aurora Java Virtual Machine.

The DBMS_JAVA package contains a large number of programs, many of which are intended for Oracle internal use only. Nevertheless, we can take advantage of a number of very useful programs; most can also be called within SQL statements. Table 22-5 summarizes some of the DBMS_JAVA programs. As noted earlier in the chapter, DBMS_JAVA also offers programs to manage security and permissions.

Table 22-5. Common DBMS_JAVA programs

Program

Description

LONGNAME function

Obtains the full (long) Java name for a given Oracle short name

GET_COMPILER_OPTION function

Looks up an option in the Java options table

SET_COMPILER_OPTION procedure

Sets a value in the Java options table and creates the table, if one does not exist

RESET_COMPILER_OPTION procedure

Resets a compiler option in the Java options table

SET_OUTPUT procedure

Redirects Java output to the DBMS_OUTPUT text buffer

EXPORT_SOURCE procedure

Exports a Java source schema object into an Oracle large object (LOB)

EXPORT_RESOURCE procedure

Exports a Java resource schema object into an Oracle large object

EXPORT_CLASS procedure

Exports a Java class schema object into an Oracle large object

These programs are explored in detail in the following sections.

LONGNAME: Converting Java Long Names

Java class and method names can easily exceed the maximum SQL identifier ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required