Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_lob.copy vs. variable assignment

126539Sep 12 2002
Cleanup of lob in java

Scenerio.
Java mid-tier application creates a CLOB variables to pass to Database PLSQL stored procedure One clob input, one output argument.

Input clob variable setup with dbms_lob.createtemporary(a,true,dbms_lob.call);

clob data taken from Front end written into with dbms_lob.writeappend.

Mid-tier app does NOT do a dbms_lob.createtemporary for second output variable.

Database stored procedure called to process data.

java call sp1(a in clob, b in out clob);

plsql sp on database...

procedure sp1(a in clob,b out clob)
is
lcl_clob clob;
begin
dbms_lob.createtemporary(lcl_clob,true,dbms_lob.call);
....
---- procedure process input clob data and when complete. filling lcl_clob with dbms_lob.copy
....
--When sp1 completes it does assignment to return data to java

b := lcl_clob; --this does deep copy

dbms_lob.freetemporary(lcl_clob);--free local temp clob
end;

Data gets back to JAVA midtier app. OK the Java app Read and Close clob.

Concern is about java's b defined clob and memory. How is java's defined b clob deep copy cleaned up?

Any memory/garbage issue on Java side with this? Mid tier server Weblogic on Win 2K

any ideas or issues. DB Environment: Oracle 8.1.7.3 on HPUX 11
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2002
Added on Sep 12 2002
0 comments
320 views