Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-235

JDBC connection pooling fails on closed connections

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 Beta 2
    • Fix Version/s: 1.0.0
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: All
    • Bugzilla Id:
      2034

      Description

      If you call getConnection() on the JDBC data source object you've configured in
      your struts-config.xml you may get connections that have been closed (eg. due
      timeouts). You wouldn't expect this from a pool. I added a check like

      >>>>
      if(connection.getConnection().isClosed()) {
      connection = null;
      useCount--;
      activeCount--;
      } else {
      // unclose the connection's wrapper
      connection.setClosed(false);
      return connection;
      }
      <<<<

      to the getConnection() method of the GenericDataSource class and it seems to
      work well.

        Attachments

          Activity

            People

            • Assignee:
              craigmcc Craig R. McClanahan
              Reporter:
              ecthelian@gmx.net ecthelian
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: