Re: CAY-160 -- Database reconnect support? [Oracle 9i]

From: Mike Kienenberger (mkienen..laska.net)
Date: Thu Jul 08 2004 - 15:54:09 EDT

  • Next message: Andrus Adamchik: "Re: CAY-160 -- Database reconnect support? [Oracle 9i]"

    Mike Kienenberger <mkienen..laska.net> wrote:
    > I looked through 15+ database reconnect errors, and they all threw
    exceptions
    > on these three pieces of code (and primarily the last two -- in all but
    two
    > cases).
    >
    > Looking at the code in getConnection makes me think that an error in this
    > code needs to retry the whole connection, so I'm going to try updating
    > PoolManager.getConnection() with two reconnecting error traps and see if
    > that helps.

    Ok. I now get only these errors when the database is restarted:
    ------
    Caused by: java.sql.SQLException: Can't obtain connection. Request timed
    out. Total used connections: 1
            at
    org.objectstyle.cayenne.conn.PoolManager.getConnection(PoolManager.java:433)
            at
    org.objectstyle.cayenne.conn.PoolManager.getConnection(PoolManager.java:385)
            at
    org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:295)
    ------

    Does running the following code in PoolManager.getConnection somehow fail to
    free up the connection properly?
    =====
                        newConnection.close();
                        return newConnection.getConnection();
    =====

    I could increase the pool size, but that would just be ignoring the problem.

    -Mike



    This archive was generated by hypermail 2.0.0 : Thu Jul 08 2004 - 15:54:04 EDT