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

JDBC connection pooling fails on closed connections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0 Beta 2
    • 1.0.0
    • Core
    • None
    • Operating System: other
      Platform: All
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: