The Oracle Database 10 g includes the DBMS_JAVA package containing procedures and functions to manage the Java objects in the database. A couple of the procedures in this package, grant_permission and set_output, were listed earlier in the chapter. The Oracle Database Java Developer s Guide 10 g Release 1 describes all of the procedures and functions in detail, and Table 12-5 provides a summary of the same information.
Procedure or Function | Description |
---|---|
FUNCTION longname | Because Java object and method names may exceed the 30-character limit for Oracle object names , Oracle saves Java objects with both their original long name and a system generated short name. The longname function returns the long name for a Java object. |
FUNCTION shortname | The shortname function returns the corresponding short name for a potentially truncated Java object long name. |
FUNCTION get_compiler_option | Set, retrieve, and reset are the options for the Java compiler included with the Oracle Database. |
FUNCTION resolver | The resolver function returns the resolver specification for a Java object that contains the list of schemas to search for the dependent class objects. |
FUNCTION derivedFrom | The derivedFrom function returns the source name for a Java object saved in the database. |
FUNCTION fixed_in_instance | The fixed_in_instance function returns 1 if a Java object is permanently kept within the Database, and 0 if a Java object is not permanently kept. Objects included in the J2SE platform are permanently kept. |
PROCEDURE set_output | The set_output procedure is used in conjunction with SET SERVEROUTPUT ON in SQL*Plus. It redirects output to System.out and System.err to the screen instead of a trace file in the user dump directory. |
PROCEDURE start_debugging | The start_debugging, stop_debugging, and restart_debugging procedures start and stop the debug agent. |
PROCEDURE export_source | The export_source procedure exports a Java source file stored in the database into an Oracle large object (LOB). |
PROCEDURE export_class | The export_class procedure exports a Java class file stored in the database into an Oracle LOB (must be a BLOB, or binary large object). |
PROCEDURE export_resource | The export_resource procedure exports a Java resource file stored in the database into an Oracle LOB. |
PROCEDURE loadjava | The loadjava and dropjava procedures load and drop classes using a database call rather than the command-line utilities. |
PROCEDURE grant_permission | The grant_permission, restrict_permission, grant_policy_permission, revoke_permission, disable_permission, and delete_permission procedures manage JVM permissions. Certain operations, such as opening sockets or writing to files, require extra permission. |
PROCEDURE set_preference | The set_preference procedure sets system and user Java preferences. |