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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access