A script-enabled browser is required for this page to function properly.

ORA_JAVA.NEW_GLOBAL_REF

This function returns a reference handle that can be used as a global variable to reference an object of type ORA_JAVA.JOBJECT.

Syntax

FUNCTION ORA_JAVA.NEW_GLOBAL_REF(
 obj IN ORA_JAVA.JOBJECT)
RETURN ORA_JAVA.JOBJECT;

Parameter

Description

obj

A valid instance of the Java class you want to create a global reference to. The actual parameter can be any object of type ORA_JAVA.JOBJECT.

Returns

An object of the PL/SQL type ORA_JAVA.JOBJECT.

Usage notes

Example

PROCEDURE foo IS
 obj ORA_JAVA.JOBJECT;
 ...
BEGIN
 obj := myclass.new;
 mypkg.instobj := ORA_JAVA.NEW_GLOBAL_REF(obj);
 ...
END;

See also

Controlling Java Object Persistence