Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-160

Improved handling of database reconnects

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1 [LEGACY]
    • 1.1 [LEGACY]
    • Core Library
    • None
    • Oracle 9i 9.2.0.5

    Description

      Cayenne fails to reconnect after an Oracle 9i 9.2.0.5 database reboot.

      This patch appears to fix the problem by closing the PooledConnection then re-attempting PooledConnection.getConnection() once more when an SQLException is thrown during PooledConnection.getConnection() from PoolManager.getConnection().

      Unfortunately, my understanding of connection pooling is basic, so I don't know if this may have unintended side-effects, but the idea seems sound.

      I made the change in both places where PooledConnection.getConnection() is called from PoolManager.getConnection().

      I'm not sure whether it might make more sense to rethrow the original pre-closed-connection exception if the exception happens a second time.

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            mkienenb Mike Kienenberger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: