[OS-JIRA] Created: (CAY-97) running out of Connections ?!?

From: jir..bjectstyle.org
Date: Mon Feb 16 2004 - 11:59:13 EST

  • Next message: Mike Kienenberger: "Re: Optimistic Locking Progress report 5 - problems with Oracle 9i DATE/TIMESTAMP lockings"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-97

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-97
        Summary: running out of Connections ?!?
           Type: Bug

         Status: Assigned
       Priority: Trivial

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Versions:
                 1.0 [STABLE]

       Assignee: Andrus Adamchik
       Reporter: Richard Holly

        Created: Mon, 16 Feb 2004 11:59 AM
        Updated: Mon, 16 Feb 2004 11:59 AM
    Environment: OS: Windows XP, Linux MDK 9.2
    DB: Oracle 8i, Mysql

    Description:
    There's case when i am running quickly out of db connections, because connections are not closed.
    I have extended "data port" example application to do some more featured synchronizer application. As in example i am using directlly
    DataNodes to do queries with entities.
    When
    ...
                SelectQuery select = new SelectQuery();
                select.setRoot(entity);
                select.setFetchingDataRows(true);
                sourceNode.performQuery(select, observer);
    ...
    is called, and exception occured, connection is not closed in sourceNode and there is no way to close it ( return back to pool )anymore, because

    DataNode.java (272)
    ....
           if (isIterated) {
            // if ResultIterator is returned to the user,
            // DataNode is not responsible for closing the connections
            // exception handling, and other housekeeping.
            // trick "finally" to avoid closing connection here
            // it will be closed by the ResultIterator
               con = null;
           }
           runSelect(localCon, nextQuery, opObserver);
    ...
    and finally block is not called
    ....
            finally {
                try {
                    // return connection to the pool if it was checked out
                    if (con != null) {
                        con.close();
                    }
                }
                // finally catch connection closing exceptions...
                catch (Exception finalEx) {
                    opObserver.nextGlobalException(finalEx);
                }
            }

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Mon Feb 16 2004 - 11:59:15 EST