Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 294578 - Need to cleanup Temporary LOBs before returning the values
Summary: Need to cleanup Temporary LOBs before returning the values
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: David Minsky CLA
QA Contact:
URL:
Whiteboard: submitted_patch
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-09 05:24 EST by Vikram Bhatia CLA
Modified: 2022-06-09 10:04 EDT (History)
4 users (show)

See Also:


Attachments
Testcase (8.24 KB, application/zip)
2009-11-09 05:24 EST, Vikram Bhatia CLA
david.minsky: iplog+
Details
Proposed Solution (3.50 KB, patch)
2009-11-09 05:31 EST, Vikram Bhatia CLA
no flags Details | Diff
Proposed Solution (3.45 KB, patch)
2010-01-22 08:56 EST, Vikram Bhatia CLA
no flags Details | Diff
Minor comment changes to previous patch (4.50 KB, patch)
2010-01-25 17:03 EST, David Minsky CLA
david.minsky: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vikram Bhatia CLA 2009-11-09 05:24:59 EST
Created attachment 151678 [details]
Testcase

Lets say there is a select query which returns a clob as one of the column.
If this clob is returned after some PL/SQL manipulation, i.e it should
be a temporary clob, it results in OutofMemoryError. As the value is converted
to char[] or byte[] before returning, user doesn't have reference to it, they
cannot call freeTemporary() method to release its memory. So, eclipselink needs
to identify temporary LOBs and free them.

To reproduce the issue.
1. Import attached project LOBTest in Eclipse.
2. Run script create.sql in oracle database. 
3. Insert big clob values in person2 table.
4. Run Junit testcase test.Bug8673104Test.
Comment 1 Vikram Bhatia CLA 2009-11-09 05:31:04 EST
Created attachment 151679 [details]
Proposed Solution

Bug8673104.diff is the proposed solution to free up the memory by calling freeTemporary() method on LOBs if LOB is temporary object.
Comment 2 Tom Ware CLA 2009-11-12 13:27:40 EST
Setting target and priority.  See the following page for an explanation of these values:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 3 Vikram Bhatia CLA 2010-01-22 08:54:21 EST
Comment on attachment 151679 [details]
Proposed Solution

Will reattach diff with small modifications
Comment 4 Vikram Bhatia CLA 2010-01-22 08:56:30 EST
Created attachment 156934 [details]
Proposed Solution

Modified the solution as per correct process.
Comment 5 David Minsky CLA 2010-01-25 17:03:08 EST
Created attachment 157187 [details]
Minor comment changes to previous patch

Added comments to indicate that this code submission is from Vikram Bhatia
Comment 6 David Minsky CLA 2010-01-25 17:30:15 EST
Fixed in trunk - revision 6392
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=6392
Comment 7 David Minsky CLA 2010-01-25 18:22:34 EST
Fixed in 2.0
Revision 6393
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=6393
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:04:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink