You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2014/03/03 10:03:13 UTC

svn commit: r4547 - /dev/commons/dbcp/ /dev/commons/dbcp/binaries/ /dev/commons/dbcp/source/ /release/commons/dbcp/ /release/commons/dbcp/binaries/ /release/commons/dbcp/source/

Author: markt
Date: Mon Mar  3 09:03:13 2014
New Revision: 4547

Log:
Release Commons DBCP 2.0

Added:
    release/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz
      - copied unchanged from r4529, dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz
    release/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz.asc
      - copied unchanged from r4529, dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz.asc
    release/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz.md5
      - copied unchanged from r4529, dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz.md5
    release/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip
      - copied unchanged from r4529, dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip
    release/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip.asc
      - copied unchanged from r4529, dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip.asc
    release/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip.md5
      - copied unchanged from r4529, dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip.md5
    release/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz
      - copied unchanged from r4529, dev/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz
    release/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz.asc
      - copied unchanged from r4529, dev/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz.asc
    release/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz.md5
      - copied unchanged from r4529, dev/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz.md5
    release/commons/dbcp/source/commons-dbcp2-2.0-src.zip
      - copied unchanged from r4529, dev/commons/dbcp/source/commons-dbcp2-2.0-src.zip
    release/commons/dbcp/source/commons-dbcp2-2.0-src.zip.asc
      - copied unchanged from r4529, dev/commons/dbcp/source/commons-dbcp2-2.0-src.zip.asc
    release/commons/dbcp/source/commons-dbcp2-2.0-src.zip.md5
      - copied unchanged from r4529, dev/commons/dbcp/source/commons-dbcp2-2.0-src.zip.md5
Removed:
    dev/commons/dbcp/RELEASE-NOTES.txt
    dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz
    dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz.asc
    dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.tar.gz.md5
    dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip
    dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip.asc
    dev/commons/dbcp/binaries/commons-dbcp2-2.0-bin.zip.md5
    dev/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz
    dev/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz.asc
    dev/commons/dbcp/source/commons-dbcp2-2.0-src.tar.gz.md5
    dev/commons/dbcp/source/commons-dbcp2-2.0-src.zip
    dev/commons/dbcp/source/commons-dbcp2-2.0-src.zip.asc
    dev/commons/dbcp/source/commons-dbcp2-2.0-src.zip.md5
Modified:
    release/commons/dbcp/README.html
    release/commons/dbcp/RELEASE-NOTES.txt

Modified: release/commons/dbcp/README.html
==============================================================================
--- release/commons/dbcp/README.html (original)
+++ release/commons/dbcp/README.html Mon Mar  3 09:03:13 2014
@@ -1,10 +1,11 @@
 <h1>Commons-DBCP</h1>
 
 <p>
-Note that DBCP comes in two versions which are for different JDBC releases:
+Note that DBCP comes in three versions which are for different JDBC releases:
 <ul>
-<li>DBCP 1.4 for JDBC 4 (JDK 1.6)</li>
-<li>DBCP 1.3 for JDBC 3 (JDK 1.4-1.5)</li>
+<li>DBCP 2.0 for JDBC 4.1 (Java 7+)
+<li>DBCP 1.4 for JDBC 4 (Java 6)</li>
+<li>DBCP 1.3 for JDBC 3 (Java 1.4 and Java 5)</li>
 </ul>
 </p>
 
@@ -34,13 +35,13 @@ HREF="http://www.apache.org/dist/commons
 
 <pre>Always test available signatures, <i>e.g.</i>,
 $ pgpk -a KEYS
-$ pgpv commons-dbcp-1.4.tar.gz.asc
+$ pgpv commons-dbcp2-2.0-bin.tar.gz.asc
 or,
 $ pgp -ka KEYS
-$ pgp commons-dbcp-1.4.tar.gz.asc
+$ pgp commons-dbcp2-2.0-bin.tar.gz.asc
 or,
 $ gpg --import KEYS
-$ gpg --verify commons-dbcp-1.4.tar.gz.asc
+$ gpg --verify commons-dbcp2-2.0-bin.tar.gz.asc
 </pre>
 <p>
 

Modified: release/commons/dbcp/RELEASE-NOTES.txt
==============================================================================
--- release/commons/dbcp/RELEASE-NOTES.txt (original)
+++ release/commons/dbcp/RELEASE-NOTES.txt Mon Mar  3 09:03:13 2014
@@ -1,143 +1,108 @@
-                        
-
-              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/
-
+              Apache Apache Commons DBCP
+                  Version 2.0
+                 RELEASE NOTES
+
+The Apache Commons DBCP team is pleased to announce the release of Apache Apache Commons DBCP 2.0
+
+Apache Commons DBCP software implements Database Connection Pooling
+
+This release includes new features as well as bug fixes and enhancements.
+Version 2.0.x supports JDBC 4.1, so requires Java 7.
+
+The Java package name has been changed from 'org.apache.commons.dbcp' to 'org.apache.commons.dbcp2'.
+Also the Maven groupId is now 'org.apache.commons' and the artifactId is 'commons-dbcp2'
+These changes are necessary because the API is not strictly binary compatible with the 1.x releases.
+To convert from the earlier releases, update the package name in imports, update the dependencies and recompile.
+There may be a few other changes to be made (TBA)
+
+Java 6 users should use DBCP 1.4.x which supports JDBC 4.
+Java 1.4 and Java 5 users should use DBCP 1.3.x which supports JDBC 3.
+Applications running under Java 7 should use DBCP 2.0.x.
+
+Changes in this version include:
+
+New features:
+o            Provide a new option (cacheState) to cache current values of autoCommit
+             and readOnly so database queries are not required for every call to the
+             associated getters. This option is enabled by default.
+o DBCP-292:  BasicDataSource instances are now exposed via JMX. All the configuration
+             properties are available as is the connection pool and the statement
+             pools (if statement pooling is enabled).
+o DBCP-368:  Expose the new Pool 2 property evictionPolicyClassName to enable more
+             sophisticated eviction strategies to be used.
+o DBCP-406:  Add support for pooling PreparedStatements that use auto-generated keys. Thanks to Steeve Beroard.
+o DBCP-177:  Enable DBCP to work with a SecurityManager such that only DBCP needs to
+             be granted the necessary permissions to communicate with the database.
+o DBCP-219:  Register pooled connections with JMX so that they may be forcibly closed
+             via JMX if required.
+o DBCP-373:  Modify SharedPoolDataSource and PerUserPoolDataSource to expose all of
+             the configuration properties of the underlying connection pool(s). This
+             represents a significant refactoring of these classes and a number of
+             property names have changed as a result.
+o DBCP-351:  Provide an option to control if autoCommit is always set to true when a
+             connection is returned to the connection pool.
+o DBCP-399:  Provide an option to control if rollback is called when a connection is
+             returned to the poll with autoCommit disabled.
+o DBCP-340:  Provide an option to set the default query timeout.
+o 249:    Add support for validation testing database connections on creation.
+
+Fixed Bugs:
+o DBCP-411:  BasicManagedDataSource - unregister from JMX on close().
+o DBCP-154:  Log validation failures of poolable connections.
+o DBCP-403:  DelegatingStatement.close() fails with NPE if statement is null
+o DBCP-322:  CPDSConnectionFactory.validateObject(Object) ignores Throwable.
+o DBCP-300:  Removed unnecessary synchronisation in BasicDataSource#createDataSource.
+o DBCP-384:  Fix threading issues with accessToUnderlyingConnectionAllowed attribute
+             of PoolingDriver which is used to support unit testing.
+o DBCP-376:  Fix thread safety issues in the SharedPoolDataSource and the
+             PerUserPoolDataSource. Thanks to Dave Oxley.
+o DBCP-382:  Allow accessToUnderlyingConnectionAllowed to be configured when
+             configuration takes place via JNDI in a JavaEE container. Thanks to Stefan Rempfer.
+o DBCP-369:  Fix threading issue when using multiple instances of the
+             SharedPoolDataSource concurrently. Thanks to Michael Pradel.
+o DBCP-391:  Ensure that the close state of a pooled connection and the underlying
+             connection is consistent when the underlying connection is closed as a
+             result of an error condition.
+o DBCP-404:  Make all mutable fields private.
+o DBCP-364:  Return BasicDataSource rather than DataSource from
+             BasicDataSourceFactory so a cast is not required to use BasicDataSource
+             specific methods.
+o DBCP-358:  The equals() implementations of the DelegatingXxx classes are now
+             symmetric. There are some important API changes underlying this fix.
+             Firstly, two DelegatingXxx instances are no longer considered equal if
+             they have the same innermost delegate. Secondly, a DelegatingXxx
+             instance is not considered equal to its innermost delegate. The
+             getInnermostDelegateInternal() method has been made public (but remains
+             part of the internal API) to allow classes extending this implementation
+             to access the innermost delegate when required.
+o DBCP-180:  Enable JDBC resources that are no longer referenced by client code to be
+             eligible for garbage collection.
+o DBCP-410:  Correct path to Javadoc overview in build.xml. Thanks to Andreas Sturmlechner.
+o DBCP-234:  The default values for readOnly, autoCommit and transactionIsolation are
+             now taken from the JDBC driver. No calls to setReadOnly(),
+             setAutoCommit() or setTransactionIsolation() will be made for a newly
+             borrowed connection unless a default is explicitly configured and the
+             connection is currently using a different setting.
+o            Connection.isValid() should not throw an SQLException if the connection
+             is closed.
+o DBCP-357:  Use Connection.isValid() to validate connections unless a validation
+             query is explicitly configured. Note that this means it is no longer
+             necessary for a validation query to be specified in order for validation
+             to take place. When testing with Oracle, this resulted in database
+             validation being approximately 7 times faster.
+
+Changes:
+o            The Java package name has been changed from org.apache.commons.dbcp to
+             org.apache.commons.dbcp2.
+o            Update to Commons Pool 2 (based on java.util.concurrent) to provide
+             pooling functionality.
+o            Updated source code for Java 1.6 (added @Override & @Deprecated
+             annotations).
+o            Removed JOCL support.
+o DBCP-143:  Remove deprecated SQLNestedException.
+
+
+For complete information on Apache Commons DBCP, including instructions on how to submit bug reports,
+patches, or suggestions for improvement, see the Apache Apache Commons DBCP website:
+
+http://commons.apache.org/proper/commons-dbcp/
\ No newline at end of file