Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4225

EmbeddedConnectionPoolDataSource40 never calls the ConnectionEventListener calbacks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Invalid
    • 10.5.1.1
    • None
    • JDBC
    • None
    • Solaris
    • Blocker
    • Regression

    Description

      I'm using EmbeddedConnectionPoolDataSource40 to implement a simple connection pool. A skeleton of the code looks like this:

      ----------
      class PoolConnectionEventListener implements ConnectionEventListener {
      ...
      }
      :
      EmbeddedConnectionPoolDataSource40 source = new EmbeddedConnectionPoolDataSource40();
      :
      connListener = new PoolConnectionEventListener();
      :
      PooledConnection conn = pconn.getConnection();
      conn.addConnectionEventListener(connListener);
      ----------

      This is so I can catch the connectionClosed and connectionErrorOccurred events and recycle the connections. In Derby 10.4.2.1 this all works fine, in 10.5.1.1 it doesn't work at all - the callbacks never get made. This makes 10.5.1.1 unusable in anything that uses connection pooling, such as a JNDI context.

      I haven't checked ClientConnectionPoolDataSource40, it may have the same problem.

      Attachments

        1. ConnectionPoolTest.java
          1.0 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alanbur Alan Burlison
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: