Object reference to number
I am new to Java and need some assistance. I am using java stored procedures in Oracle and need to convert an object reference in java to a number so that I can pass it back to Oracle for use further down the oracle stored procedure. See the following code for a rough idea of what I am trying to accomplish:
static int GetObject()
Object o = new Object();
int ref = GetRef(o);
static void SetValue(int ref, string value)
Object o = GetObject(ref);
o.setProperty = value;
I am struggling with the "GetRef" part.... :confused: I don't know how to accomplish it in Java. Any help or links would be appreciated...
-- Oracle stored proc
create or replace procedure do_something as
l_ohnd := jsp.GetObject();
-- oracle code...
jsp.SetValue(l_ohnd, 'new value');