                        

              commons-dbcp-1.3/1.4 RELEASE NOTES

This release includes new features as well as bug fixes and enhancements.  Some bug fixes
change semantics (e.g. connection close is now idempotent).  The 1.3 and 1.4 releases of DBCP
are built from the same sources.  Version 1.4 supports JDBC 4, so requires JDK 1.6. 
Applications running under JDK 1.4-1.5 must use DBCP 1.3. Applications running under JDK 1.6
should use DBCP 1.4. Other than support for the added methods in JDBC 4, there is nothing new
or different in DBCP 1.4 vs. DBCP 1.3. The list of changes below since 1.2.2 applies to both
the 1.3 and 1.4 release.  Other than the issue related to adding JDBC 4 support (DBCP-191), 
all bug fixes or new features are included in both DBCP 1.3 and 1.4.

Changes since DBCP 1.2.2 include:

New features:
o  DBCP-204:  Made PoolingConnection pool CallableStatements. When BasicDataSource's 
        poolPreparedStatements property is true, CallableStatements are now
        pooled along with PreparedStatements. The maxOpenPreparedStatements
        property limits the combined number of Callable and Prepared statements
        that can be in use at a given time. Thanks to Wei Chen. 
o  DBCP-226:  Added a validationQueryTimeout configuration parameter to BasicDataSource
        allowing the user to specify a timeout value (in seconds) for connection
        validation queries. 
o  DBCP-175:  Added a connectionInitSqls configuration parameter to BasicDataSource
        allowing the user to specify a collection of SQL statements to execute
        one time when a physical database connection is first opened. Thanks to Jiri Melichna and Jerome Lacoste. 
o  DBCP-228:  Added support for pooling managed connections. Thanks to Dain Sundstrom. 
o  DBCP-230:  Added BasicManagedDataSource, extending BasicDataSource.
        Also improved extensibility of BasicDataSource by encapsulating
        methods to create object pool, connection factory and datasource
        instance previously embedded in createDataSource. Thanks to Dain Sundstrom. 

Fixed Bugs:
o  DBCP-320:  Eliminated poolKeys cache from PerUserPoolDataSource. 
o  DBCP-321:  Eliminated userKeys LRUMap cache from SharedPoolDataSource. 
o  DBCP-319:  Made private fields final where possible. Thanks to Sebastian Bazley. 
o  DBCP-318:  PerUserPoolDataSource.getPooledConnectionAndInfo multi-threading bug. Thanks to Sebastian Bazley. 
o  DBCP-315:  Remove throws clause from method that does not throw an exception. Thanks to Sebastian Bazley. 
o  DBCP-313:  Remove code that catches and ignores Exceptions when calling
        PooledConnection.removeConnectionEventListener(ConnectionEventListener)
        as the method does not throw any Exceptions. Thanks to Sebastian Bazley. 
o  DBCP-316:  Remove impossible null check. Thanks to Sebastian Bazley. 
o  DBCP-303:  Ensure Statement.getGeneratedKeys() works correctly with the CPDS
        adapter. Thanks to Dave Oxley. 
o  DBCP-302:  Removed incorrectly advertised ClassNotFoundException from
        JOCLContentHandler.ConstructorDetails.createObject(). Thanks to Sebastian Bazley. 
o  DBCP-8:  Handle user password changes for InstanceKeyDataSources. 
o  DBCP-294:  Added PoolableManagedConnection and PoolableManagedConnectionFactory so that
        pooled managed connections can unregister themselves from transaction registries,
        avoiding resource leaks. Thanks to Philippe Mouawad. 
o  DBCP-212:  PoolableConnectionFactory.makeObject() is no longer synchronized. This
        provides improved response times when load spikes at the cost of a
        faster rise in database server load. This change was made as a partial
        fix for DBCP-212.  The synchronization changes in Commons Pool 1.5 complete
        the fix for this issue. 
o  DBCP-242:  Reverted DelegatingConnection close to 1.2.2 version to ensure
        open statements are closed before the underlying connection is closed. 
o  DBCP-235:  Refactor DelegatingConnection and ManagedConnection enable overridden
        equals() and hashcode() to work correctly. 
o  DBCP-215:  Modified BasicDataSourceFactory to complete initialization of the pool
        by creating initialSize connections rather than leaving this to lazy
        initialization when the pool is used. 
o  DBCP-253:  Eliminated masked _stmt field in descendents of DelegatingStatement. 
o  DBCP-191:  Modified DBCP sources to support compilation under JDK 1.4-1.6
        using Ant flags to do conditional compilation. Thanks to Michael Heuer and J. David Beutel. 
o  DBCP-272:  Added a static initializer to BasicDatasource that calls
        DriverManager.getDrivers() to force initialization before we ever do
        anything that might use Class.forName() to load (and register) a JDBC
        driver. 
o  DBCP-4:  Eliminated direct System.out calls in AbandonedTrace. 
o  DBCP-264:  Modified DelegatingStatment close to clear open batches. 
o  DBCP-255:  Eliminated unused private "parent" field in AbandonedTrace. 
o  DBCP-273:  Fixed errors handling boolean-valued Reference properties in 
        InstanceKeyObjectFactory, DriverAdapterCPDS that were causing 
        testOnBorrow and poolPreparedStatements properties to be incorrectly
        set when creating objects from javax.naming.Reference instances. Thanks to Mark Lin. 
o  DBCP-271:  Made private instance fields of AbandonedTrace volatile (parent,
        createdBy, lastUsed, createdTime) or final (trace). Thanks to Sebastian Bazley. 
o  DBCP-270:  Narrowed synchronization in AbandonedTrace to resolve an Evictor deadlock. Thanks to Filip Hanik. 
o  DBCP-218:  Corrected Javadoc to state that getLoginTimeout and setLoginTimeout are
        NOT supported by BasicDataSource. 
o  DBCP-221:  BasicDataSource.close() now permanently marks the data source as closed,
        and no new connections can be obtained from the data source. At close all
        idle connections are destroyed and the method returns.  As the remaining
        active connections are closed, they are destroyed. 
o  DBCP-241:  Eliminated potential sources of NullPointerExceptions in 
        PoolingConnection. 
o  DBCP-216:  Improved error recovery and listener cleanup in 
        KeyedCPDSConnectionFactory. Substituted calls to destroyObject with
         _pool.invalidateObject on error to ensure pool active count is
        decremented on error events. Ensured that events from closed or invalid
        connections are ignored and listeners are cleaned up. Thanks to Marcos Sanz. 
o  DBCP-245:  Fixed error in SharedPoolDataSource causing incorrect passwords to be 
        stored under certain conditions. Thanks to Michael Drechsel. 
o  DBCP-237:  Added exception handler to ensure that PooledConnections are not
        orphaned when an exception occurs in setUpDefaults or clearWarnings in 
        IntanceKeyDataSource.getConnection. Thanks to Oliver Matz. 
o  DBCP-252:  Made getPool synchronized in PoolableConnectionFactory.
        Fixes inconsistent synchronization accessing _pool. Thanks to FindBugs. 
o  DBCP-252:  Fixed inconsistent synchronization on _rollbackAfterValidation,
        _validationQuery and _pool in CPDSConnectionFactory and 
        KeyedCPDSConnectionFactory by making the first two volatile and making
        both getter and setter for _pool synchronized. Thanks to FindBugs. 

Changes:
o  DBCP-314:  Renamed variables with duplicate names in different scopes. Thanks to Sebastian Bazley. 
o  DBCP-312:  Clarified javadoc for BasicDataSource close() method. Thanks to Glen Mazza. 
o  DBCP-305:  Use an API specific exception for logging abandoned objects to make
        scanning the logs for these exceptions simpler and to provide a better
        message that includes the creation time of the abandoned object. Thanks to Christopher Schultz. 
o  DBCP-203:  Make the class loader used to load the JDBC driver configurable for the
        BasicDatasource. Thanks to Mark Grand. 
o  DBCP-289:  Made XADataSource configurable in BasicManagedDataSource. Thanks to Marc Kannegießer. 
o  DBCP-276:  Added connectionProperties property to DriverAdapterCPDS. 
o  DBCP-265:  Add a DelegatingDatabaseMetaData to track ResultSets returned from
        DatabaseMetaData objects. 
o  DBCP-211:  Added Maven 2 pom.xml. Removed a block of code from TestJOCLed that set
        the Xerces parser manually. This was to support early JDKs. The 1.3
        version of DBCP requires JDK 1.4+. 
o  DBCP-233:  Changed behavior to allow Connection, Statement, PreparedStatement,
        CallableStatement and ResultSet to be closed multiple times. The first
        time close is called the resource is closed and any subsequent calls
        have no effect. This behavior is required as per the JavaDocs for these
        classes. Also added tests for closing all types multiple times and
        updated any tests that incorrectly assert that a resource can not be
        closed more then once.  Fixes DBCP-3, DBCP-5, DBCP-23 and DBCP-134. Thanks to Dain Sundstrom. 
o  DBCP-11:  Modified PoolingDataSource, PoolingDriver and DelegatingStatement to
        assure that all returned Statements, PreparedStatements, 
        CallableStatements and ResultSets are wrapped with a delegating object,
        which already properly handle the back pointers for Connection and
        Statement.  Also added tests to to assure that the *same* object used 
        to create the statement or result set is returned  from either 
        getConnection() or getStatement(). Thanks to Dain Sundstrom. 
o  DBCP-143:  SQLNestedException has been deprecated and will be replaced in DBCP 2.0 with
        SQLException and standard Java exception chaining. 

 
For complete information on commons-dbcp, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the commons-dbcp website:

http://commons.apache.org/dbcp/

