Hi!
I am working with latest slide 2.0 from cvs running on
Oracle 9i (using default configuration for Oracle from
Domain.xml).
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) {
            }
            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.

AND ANYWAY function isConnected in jdbc stores should
only check if connection is assigned (!=null). All
software I know deals with db connections like this.
The rest causes only huge performance degradation
(about 75% is spend on running checking code). 

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.

Bye



=====
Piotr Walendziak
e-mail: [EMAIL PROTECTED]

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to