jakarta-slide-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23587] New: - Oracle resources leak.
Date Fri, 03 Oct 2003 09:34:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23587>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23587

Oracle resources leak.

           Summary: Oracle resources leak.
           Product: Slide
           Version: Nightly
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core
        AssignedTo: slide-dev@jakarta.apache.org
        ReportedBy: pwalendziak@yahoo.com


I found slide resources problem when saving with
webdav many documents into slide. In Oracle there is a
limit of open cursors.

When putting files with webdav there is used for this
operation
org.apache.slide.webdav.util.VersioningHelper. In
function public void versionControl( String
resourcePath ) throws SlideException

there is following code:
 
// Copy properties VCR->VR
297:            NodeRevisionContent rNrc =
content.retrieve( sToken, rNrds, rNrd );

Stream from rNrc variable is not closed - it causes
leak in Oracle cursor resources for connection. Of
course slide design foreseen this inconvenience ;) so
we have ConnectIfNeededAndPossible function which is
making new db connection if old is unuseful and that's
how it masks such errors (there can be more of such).

So I would propose to add to NodeRevisionContent class
such method:

public void release() {
            try {
                if(reader != null) {
                    reader.close();
                }
            catch(IOException ioe) {
                  ioe.printStackTrace();
            }
            try {
                if(inputStream != null) {
                    inputStream.close();
                }
            }
            catch(IOException ioe) {
                    ioe.printStackTrace();
            }
    }

It closes resources associated with
NodeRevisionContent. It should be called after each
call retrieving NodeRevisionContent from slide. It
ensures that system resoures are freed.

I was able to find problem with Oracle resources,
because I am using now own slide driver that only
checks presence of connection in isConnected function (see bug # 23586).

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Mime
View raw message