You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Phil Steitz <ph...@steitz.com> on 2013/01/11 03:38:49 UTC
[dbco] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
On 1/10/13 8:57 AM, markt@apache.org wrote:
> Author: markt
> Date: Thu Jan 10 16:57:07 2013
> New Revision: 1431496
>
> URL: http://svn.apache.org/viewvc?rev=1431496&view=rev
> Log:
> Update DBCP2 to require JDBC 4.1 (Java 7) since Java 6 is close to end of life and a DBCP2 release is still a little way off.
Probably should have talked about this on the list. Oh, I guess we
are. In that case, here is my +1.
Thanks!
Phil
>
> Modified:
> commons/proper/dbcp/trunk/build.xml
> commons/proper/dbcp/trunk/pom.xml
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java
>
> Modified: commons/proper/dbcp/trunk/build.xml
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/build.xml?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/build.xml (original)
> +++ commons/proper/dbcp/trunk/build.xml Thu Jan 10 16:57:07 2013
> @@ -57,7 +57,7 @@
> <property name="src.dir" value="${basedir}/src"/>
> <property name="src.java.dir" value="${src.dir}/java"/>
> <property name="src.test.dir" value="${src.dir}/test"/>
> - <property name="javac.source" value="1.5" />
> + <property name="javac.source" value="1.7" />
>
> <property name="test.failonerror" value="true" />
> <property name="test.runner" value="junit.textui.TestRunner" />
> @@ -144,7 +144,7 @@
> nohelp="true"
> nonavbar="false"
> serialwarn="false">
> - <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
> + <link href="http://docs.oracle.com/javase/7/docs/api/"/>
> <link href="http://commons.apache.org/pool/apidocs"/>
> </javadoc>
> </target>
>
> Modified: commons/proper/dbcp/trunk/pom.xml
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/pom.xml?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/pom.xml (original)
> +++ commons/proper/dbcp/trunk/pom.xml Thu Jan 10 16:57:07 2013
> @@ -204,13 +204,11 @@
> </dependencies>
>
> <properties>
> - <maven.compile.source>1.6</maven.compile.source>
> - <maven.compile.target>1.6</maven.compile.target>
> + <maven.compile.source>1.7</maven.compile.source>
> + <maven.compile.target>1.7</maven.compile.target>
> <commons.componentid>dbcp</commons.componentid>
> - <commons.release.version>1.4</commons.release.version>
> - <commons.release.desc>for JDBC 4 (JDK 1.6)</commons.release.desc>
> - <commons.release.2.version>1.3</commons.release.2.version>
> - <commons.release.2.desc>for JDBC 3 (JDK 1.4-1.5)</commons.release.2.desc>
> + <commons.release.version>2.0</commons.release.version>
> + <commons.release.desc>for JDBC 4.1 (JDK 1.7)</commons.release.desc>
> <commons.jira.id>DBCP</commons.jira.id>
> <commons.jira.pid>12310469</commons.jira.pid>
> </properties>
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java Thu Jan 10 16:57:07 2013
> @@ -24,10 +24,13 @@ import java.util.List;
> import java.util.ArrayList;
> import java.util.Iterator;
> import java.util.Collections;
> +import java.util.logging.Logger;
> import java.sql.Connection;
> import java.sql.Driver;
> import java.sql.DriverManager;
> import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> +
> import javax.sql.DataSource;
>
> import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
> @@ -1492,6 +1495,10 @@ public class BasicDataSource implements
> }
> /* JDBC_4_ANT_KEY_END */
>
> + @Override
> + public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> + throw new SQLFeatureNotSupportedException();
> + }
>
> // ------------------------------------------------------ Protected Methods
>
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java Thu Jan 10 16:57:07 2013
> @@ -752,7 +752,8 @@ public class DelegatingCallableStatement
> }
> catch (SQLException e) {
> handleException(e);
> - } }
> + }
> + }
>
> @Override
> public void setBlob(String parameterName, InputStream inputStream) throws SQLException {
> @@ -762,7 +763,8 @@ public class DelegatingCallableStatement
> }
> catch (SQLException e) {
> handleException(e);
> - } }
> + }
> + }
>
> @Override
> public void setNClob(String parameterName, Reader reader) throws SQLException {
> @@ -775,4 +777,32 @@ public class DelegatingCallableStatement
> }
> }
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public <T> T getObject(int parameterIndex, Class<T> type)
> + throws SQLException {
> + checkOpen();
> + try {
> + return ((CallableStatement)_stmt).getObject(parameterIndex, type);
> +}
> + catch (SQLException e) {
> + handleException(e);
> + return null;
> + }
> + }
> +
> + @Override
> + public <T> T getObject(String parameterName, Class<T> type)
> + throws SQLException {
> + checkOpen();
> + try {
> + return ((CallableStatement)_stmt).getObject(parameterName, type);
> + }
> + catch (SQLException e) {
> + handleException(e);
> + return null;
> + }
> + }
> +
> +
> }
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java Thu Jan 10 16:57:07 2013
> @@ -40,6 +40,7 @@ import java.sql.Struct;
> import java.util.Collections;
> import java.util.Properties;
> /* JDBC_4_ANT_KEY_END */
> +import java.util.concurrent.Executor;
>
> /**
> * A base delegating implementation of {@link Connection}.
> @@ -805,4 +806,62 @@ public class DelegatingConnection extend
> }
> }
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public void setSchema(String schema) throws SQLException {
> + checkOpen();
> + try {
> + _conn.setSchema(schema);
> + }
> + catch (SQLException e) {
> + handleException(e);
> + }
> + }
> +
> + @Override
> + public String getSchema() throws SQLException {
> + checkOpen();
> + try {
> + return _conn.getSchema();
> + }
> + catch (SQLException e) {
> + handleException(e);
> + return null;
> + }
> + }
> +
> + @Override
> + public void abort(Executor executor) throws SQLException {
> + checkOpen();
> + try {
> + _conn.abort(executor);
> + }
> + catch (SQLException e) {
> + handleException(e);
> + }
> + }
> +
> + @Override
> + public void setNetworkTimeout(Executor executor, int milliseconds)
> + throws SQLException {
> + checkOpen();
> + try {
> + _conn.setNetworkTimeout(executor, milliseconds);
> + }
> + catch (SQLException e) {
> + handleException(e);
> + }
> + }
> +
> + @Override
> + public int getNetworkTimeout() throws SQLException {
> + checkOpen();
> + try {
> + return _conn.getNetworkTimeout();
> + }
> + catch (SQLException e) {
> + handleException(e);
> + return 0;
> + }
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java Thu Jan 10 16:57:07 2013
> @@ -1379,4 +1379,31 @@ public class DelegatingDatabaseMetaData
>
> /* JDBC_4_ANT_KEY_END */
>
> + @Override
> + public ResultSet getPseudoColumns(String catalog, String schemaPattern,
> + String tableNamePattern, String columnNamePattern)
> + throws SQLException {
> + _conn.checkOpen();
> + try {
> + return DelegatingResultSet.wrapResultSet(_conn,
> + _meta.getPseudoColumns(catalog, schemaPattern,
> + tableNamePattern, columnNamePattern));
> +}
> + catch (SQLException e) {
> + handleException(e);
> + throw new AssertionError();
> + }
> + }
> +
> + @Override
> + public boolean generatedKeyAlwaysReturned() throws SQLException {
> + _conn.checkOpen();
> + try {
> + return _meta.generatedKeyAlwaysReturned();
> + }
> + catch (SQLException e) {
> + handleException(e);
> + return false;
> + }
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java Thu Jan 10 16:57:07 2013
> @@ -1275,4 +1275,27 @@ public class DelegatingResultSet extends
> }
> }
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
> + try {
> + return _res.getObject(columnIndex, type);
> + }
> + catch (SQLException e) {
> + handleException(e);
> + return null;
> + }
> + }
> +
> + @Override
> + public <T> T getObject(String columnLabel, Class<T> type)
> + throws SQLException {
> + try {
> + return _res.getObject(columnLabel, type);
> + }
> + catch (SQLException e) {
> + handleException(e);
> + return null;
> + }
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java Thu Jan 10 16:57:07 2013
> @@ -530,4 +530,25 @@ public class DelegatingStatement extends
> }
> }
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public void closeOnCompletion() throws SQLException {
> + checkOpen();
> + try {
> + _stmt.closeOnCompletion();
> + } catch (SQLException e) {
> + handleException(e);
> + }
> + }
> +
> + @Override
> + public boolean isCloseOnCompletion() throws SQLException {
> + checkOpen();
> + try {
> + return _stmt.isCloseOnCompletion();
> + } catch (SQLException e) {
> + handleException(e);
> + return false;
> + }
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java Thu Jan 10 16:57:07 2013
> @@ -23,10 +23,12 @@ import java.sql.Connection;
> import java.sql.DatabaseMetaData;
> import java.sql.PreparedStatement;
> import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> import java.sql.SQLWarning;
> import java.sql.Statement;
> import java.util.Map;
> import java.util.NoSuchElementException;
> +import java.util.logging.Logger;
>
> import javax.sql.DataSource;
>
> @@ -98,6 +100,11 @@ public class PoolingDataSource implement
> }
> /* JDBC_4_ANT_KEY_END */
>
> + @Override
> + public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> + throw new SQLFeatureNotSupportedException();
> + }
> +
> //--- DataSource methods -----------------------------------------
>
> /**
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java Thu Jan 10 16:57:07 2013
> @@ -25,6 +25,7 @@ import java.sql.DriverManager;
> import java.sql.DriverPropertyInfo;
> import java.sql.PreparedStatement;
> import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> import java.sql.SQLWarning;
> import java.sql.Statement;
> import java.util.HashMap;
> @@ -32,6 +33,7 @@ import java.util.Map;
> import java.util.NoSuchElementException;
> import java.util.Properties;
> import java.util.Set;
> +import java.util.logging.Logger;
>
> import org.apache.commons.pool2.ObjectPool;
>
> @@ -154,6 +156,11 @@ public class PoolingDriver implements Dr
> }
> }
>
> + @Override
> + public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> + throw new SQLFeatureNotSupportedException();
> + }
> +
> /**
> * Invalidates the given connection.
> *
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java Thu Jan 10 16:57:07 2013
> @@ -19,10 +19,13 @@ package org.apache.commons.dbcp2.cpdsada
>
> import java.util.Hashtable;
> import java.util.Properties;
> +import java.util.logging.Logger;
> import java.io.PrintWriter;
> import java.io.Serializable;
> import java.sql.DriverManager;
> import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> +
> import javax.sql.PooledConnection;
> import javax.sql.ConnectionPoolDataSource;
> import javax.naming.Name;
> @@ -220,6 +223,11 @@ public class DriverAdapterCPDS
> return pci;
> }
>
> + @Override
> + public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> + throw new SQLFeatureNotSupportedException();
> + }
> +
> // ----------------------------------------------------------------------
> // Referenceable implementation
>
>
> Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java (original)
> +++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java Thu Jan 10 16:57:07 2013
> @@ -21,8 +21,10 @@ import java.io.Serializable;
> import java.io.PrintWriter;
> import java.sql.Connection;
> import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> import java.util.NoSuchElementException;
> import java.util.Properties;
> +import java.util.logging.Logger;
>
> import javax.naming.Context;
> import javax.naming.InitialContext;
> @@ -181,6 +183,11 @@ public abstract class InstanceKeyDataSou
> }
> /* JDBC_4_ANT_KEY_END */
>
> + @Override
> + public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> + throw new SQLFeatureNotSupportedException();
> + }
> +
> // -------------------------------------------------------------------
> // Properties
>
>
> Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java (original)
> +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java Thu Jan 10 16:57:07 2013
> @@ -152,7 +152,7 @@ public class TesterCallableStatement ext
> }
>
> @Override
> - public Object getObject(int i, Map map) throws SQLException {
> + public Object getObject(int i, Map<String, Class<?>> map) throws SQLException {
> return null;
> }
>
> @@ -383,7 +383,7 @@ public class TesterCallableStatement ext
> }
>
> @Override
> - public Object getObject(String parameterName, Map map) throws SQLException {
> + public Object getObject(String parameterName, Map<String,Class<?>> map) throws SQLException {
> return null;
> }
>
> @@ -568,4 +568,14 @@ public class TesterCallableStatement ext
> public void setNClob(String parameterName, Reader reader) throws SQLException {
> }
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
> + return null;
> + }
> +
> + @Override
> + public <T> T getObject(String parameterName, Class<T> type) throws SQLException {
> + return null;
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java (original)
> +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java Thu Jan 10 16:57:07 2013
> @@ -35,6 +35,7 @@ import java.sql.SQLXML;
> import java.sql.Struct;
> import java.util.Properties;
> /* JDBC_4_ANT_KEY_END */
> +import java.util.concurrent.Executor;
>
> /**
> * A dummy {@link Connection}, for testing purposes.
> @@ -49,7 +50,7 @@ public class TesterConnection implements
> protected int _transactionIsolation = 1;
> protected DatabaseMetaData _metaData = new TesterDatabaseMetaData();
> protected String _catalog = null;
> - protected Map _typeMap = null;
> + protected Map<String,Class<?>> _typeMap = null;
> protected boolean _readOnly = false;
> protected SQLWarning warnings = null;
> protected String username = null;
> @@ -126,7 +127,7 @@ public class TesterConnection implements
> }
>
> @Override
> - public Map getTypeMap() throws SQLException {
> + public Map<String,Class<?>> getTypeMap() throws SQLException {
> checkOpen();
> return _typeMap;
> }
> @@ -222,7 +223,7 @@ public class TesterConnection implements
> }
>
> @Override
> - public void setTypeMap(Map map) throws SQLException {
> + public void setTypeMap(Map<String,Class<?>> map) throws SQLException {
> checkOpen();
> _typeMap = map;
> }
> @@ -383,4 +384,30 @@ public class TesterConnection implements
> throw new SQLException("Not implemented.");
> }
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public void setSchema(String schema) throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> +
> + @Override
> + public String getSchema() throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> +
> + @Override
> + public void abort(Executor executor) throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> +
> + @Override
> + public void setNetworkTimeout(Executor executor, int milliseconds)
> + throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> +
> + @Override
> + public int getNetworkTimeout() throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java (original)
> +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java Thu Jan 10 16:57:07 2013
> @@ -935,4 +935,16 @@ public class TesterDatabaseMetaData impl
> }
>
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public ResultSet getPseudoColumns(String catalog, String schemaPattern,
> + String tableNamePattern, String columnNamePattern)
> + throws SQLException {
> + return null;
> + }
> +
> + @Override
> + public boolean generatedKeyAlwaysReturned() throws SQLException {
> + return false;
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java (original)
> +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java Thu Jan 10 16:57:07 2013
> @@ -22,7 +22,9 @@ import java.sql.Driver;
> import java.sql.DriverManager;
> import java.sql.DriverPropertyInfo;
> import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> import java.util.Properties;
> +import java.util.logging.Logger;
>
> /**
> * Mock object implementing the <code>java.sql.Driver</code> interface.
> @@ -125,6 +127,11 @@ public class TesterDriver implements Dri
> return new DriverPropertyInfo[0];
> }
>
> + @Override
> + public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> + throw new SQLFeatureNotSupportedException();
> + }
> +
> protected static final String CONNECT_STRING = "jdbc:apache:commons:testdriver";
>
> // version numbers
>
> Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java (original)
> +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java Thu Jan 10 16:57:07 2013
> @@ -28,6 +28,7 @@ import java.sql.SQLException;
> import java.sql.SQLWarning;
> import java.sql.Statement;
> import java.util.Calendar;
> +import java.util.Map;
> /* JDBC_4_ANT_KEY_BEGIN */
> import java.io.InputStream;
> import java.io.Reader;
> @@ -750,7 +751,7 @@ public SQLWarning getWarnings() throws S
>
>
> @Override
> - public Object getObject(int i, java.util.Map map) throws SQLException {
> + public Object getObject(int i, Map<String,Class<?>> map) throws SQLException {
> checkOpen();
> return new Object();
> }
> @@ -780,7 +781,7 @@ public SQLWarning getWarnings() throws S
> }
>
> @Override
> - public Object getObject(String colName, java.util.Map map) throws SQLException {
> + public Object getObject(String colName, Map<String,Class<?>> map) throws SQLException {
> checkOpen();
> return colName;
> }
> @@ -1162,4 +1163,15 @@ public SQLWarning getWarnings() throws S
> throw new SQLException("Not implemented.");
> }
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> +
> + @Override
> + public <T> T getObject(String columnLabel, Class<T> type)
> + throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java (original)
> +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java Thu Jan 10 16:57:07 2013
> @@ -338,4 +338,14 @@ public class TesterStatement implements
> throw new SQLException("Not implemented.");
> }
> /* JDBC_4_ANT_KEY_END */
> +
> + @Override
> + public void closeOnCompletion() throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> +
> + @Override
> + public boolean isCloseOnCompletion() throws SQLException {
> + throw new SQLException("Not implemented.");
> + }
> }
>
> Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java
> URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java (original)
> +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java Thu Jan 10 16:57:07 2013
> @@ -19,6 +19,9 @@ package org.apache.commons.dbcp2.datasou
>
> import java.io.PrintWriter;
> import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> +import java.util.logging.Logger;
> +
> import javax.sql.ConnectionPoolDataSource;
> import javax.sql.PooledConnection;
>
> @@ -77,6 +80,11 @@ public class ConnectionPoolDataSourcePro
> delegate.setLogWriter(out);
> }
>
> + @Override
> + public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> + return delegate.getParentLogger();
> + }
> +
> /**
> * Create a TesterPooledConnection with notifyOnClose turned on
> */
> @@ -85,5 +93,4 @@ public class ConnectionPoolDataSourcePro
> tpc.setNotifyOnClose(true);
> return tpc;
> }
> -
> }
>
>
>
--
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Gary Gregory <ga...@gmail.com>.
On Tue, May 28, 2013 at 6:58 AM, Emmanuel Bourg <eb...@apache.org> wrote:
> Le 11/01/2013 08:36, Mark Thomas a écrit :
>
> > We could also add the JDBC 4.1 methods to DBCP1 but I'm not sure I like
> the idea of three builds for that version.
>
> I think we should do that. Debian and Fedora maintain a patch to be able
> to build DBCP from source (see DBCP-385), but we should assume this burden.
>
> I see 3 options, either:
>
> 1. Release DBCP 1.4.1 with no-op methods throwing a
> SQLFeatureNotSupportedException or an UnsupportedOperationException.
> This is what Fedora/Debian do.
>
That's fine with me but I would not say this is not for a maintenance
version, it should be for a minor version.
> 2. Release DBCP 1.5 with the fully implemented methods and Java 7 as a
> build requirement.
>
Fine with me, nice and simple.
>
> 3. Release DBCP 1.4.1 or 1.5 with the fully implemented methods but
> using reflection, thus compiling with Java 6 or Java 7.
>
I do not like these kinds of solutions because I have to think twice about
what the dynamic behavior means on different platforms.
Gary
>
>
> What do you think ?
>
>
> Emmanuel Bourg
>
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Phil Steitz <ph...@gmail.com>.
On 5/30/13 4:06 AM, Emmanuel Bourg wrote:
> Le 30/05/2013 11:40, Phil Steitz a écrit :
>
>> Sorry for stupidity above. I was not thinking through the
>> consequences of the gump-esque build process. I guess if we really
>> want to support everything building from source with no binary
>> incompatible change, we are going to have to support the 1.x code
>> suitably hacked forward indefinitely. This is not a happy prospect;
>> but given how widely used DBCP is, we should do it. Given this, I
>> agree with your original proposal that we build in another layer of
>> filtering to the 1.x code base, with the no-op patch merged in. I
>> will play with this over the weekend and see if I can get an Ant
>> build working that extends what we do now to produce 1.3.x from the
>> 1.4.x sources to also source a 1.5.x.
OK, I played with this a little over the weekend and I think it is
doable. Before I start committing stuff, I want to make sure others
are OK with the following approach:
1. Create a new branch, DBCP_1_5_x. This will basically take the
role of DBCP_!_4_X, so once created *all code changes / bug fixes
for 1.x series should be applied only to the 1_5_x branch*.
2. Add the new methods (UOE-ed) to the 1_5_x sources, surrounded by
JDBC_4_1_ANT_KEY_BEGIN/END tags
3. Create build-1.4, pom-1.4 like the 1.3 versions, modifying 1.3
build to filter both, 1.4 only the 4.1 stuff.
4. Modify build.xml and the RC build process in release-process.txt
to handle the additional version.
The process gets a little more complicated, but I think it will work
and will allow us to avoid having to backport anything. The only
hitch that I see so far is that the process documented in
release-process.txt creates maven artifacts "manually" that I need
to figure out how to install without using the release plugin. Is
that still possible somehow?
If there are no objections to the setup above, I will create the 1.5
branch and add the JDBC4.1 methods and filter tags there.
Phil
> Thank you Phil.
>
> Hopefully this kind of maintenance happens only once every 2 years.
>
>
> Emmanuel Bourg
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Emmanuel Bourg <eb...@apache.org>.
Le 30/05/2013 11:40, Phil Steitz a écrit :
> Sorry for stupidity above. I was not thinking through the
> consequences of the gump-esque build process. I guess if we really
> want to support everything building from source with no binary
> incompatible change, we are going to have to support the 1.x code
> suitably hacked forward indefinitely. This is not a happy prospect;
> but given how widely used DBCP is, we should do it. Given this, I
> agree with your original proposal that we build in another layer of
> filtering to the 1.x code base, with the no-op patch merged in. I
> will play with this over the weekend and see if I can get an Ant
> build working that extends what we do now to produce 1.3.x from the
> 1.4.x sources to also source a 1.5.x.
Thank you Phil.
Hopefully this kind of maintenance happens only once every 2 years.
Emmanuel Bourg
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Phil Steitz <ph...@gmail.com>.
On 5/30/13 1:47 AM, Emmanuel Bourg wrote:
> Le 30/05/2013 06:12, Phil Steitz a écrit :
>
>> Only because we have not yet released 2.0. If we focus on doing
>> that, their problem is solved. That was basically my point above.
> Let's suppose we release a binary incompatible 2.0 version that compiles
> with Java 7, the Debian/Fedora maintainers will have to patch every
> packaged software that depends on DBCP 1.x to use the new API until the
> change is applied upstream (if ever it's applied). If the behavior of
> the API changed they'll also have to endorse the responsibility for
> testing their changes. That's worse than patching DBCP 1.x.
Sorry for stupidity above. I was not thinking through the
consequences of the gump-esque build process. I guess if we really
want to support everything building from source with no binary
incompatible change, we are going to have to support the 1.x code
suitably hacked forward indefinitely. This is not a happy prospect;
but given how widely used DBCP is, we should do it. Given this, I
agree with your original proposal that we build in another layer of
filtering to the 1.x code base, with the no-op patch merged in. I
will play with this over the weekend and see if I can get an Ant
build working that extends what we do now to produce 1.3.x from the
1.4.x sources to also source a 1.5.x.
Phil
>
>
>> Rather than hacking more compile filters so that 1.x can work for 3
>> different - incompatible - JDBC versions, we should split cleanly.
>> We are not that far away from being able to release 2.0. Then
>> whoever wants to target JDK 1.7 can use those sources.
> To avoid the proliferation of maintenance releases we may state that we
> support only the last two revisions of JDBC. Thus we would only support
> Java 7 (DBCP 1.5.x) and Java 6 (DBCP 1.4.x), and we abandon DBCP 1.3.
> Once Java 8 is released we drop Java 6 support (be it with DBCP 1.x or
> DBCP 2.x).
>
>
> Emmanuel Bourg
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Emmanuel Bourg <eb...@apache.org>.
Le 30/05/2013 06:12, Phil Steitz a écrit :
> Only because we have not yet released 2.0. If we focus on doing
> that, their problem is solved. That was basically my point above.
Let's suppose we release a binary incompatible 2.0 version that compiles
with Java 7, the Debian/Fedora maintainers will have to patch every
packaged software that depends on DBCP 1.x to use the new API until the
change is applied upstream (if ever it's applied). If the behavior of
the API changed they'll also have to endorse the responsibility for
testing their changes. That's worse than patching DBCP 1.x.
> Rather than hacking more compile filters so that 1.x can work for 3
> different - incompatible - JDBC versions, we should split cleanly.
> We are not that far away from being able to release 2.0. Then
> whoever wants to target JDK 1.7 can use those sources.
To avoid the proliferation of maintenance releases we may state that we
support only the last two revisions of JDBC. Thus we would only support
Java 7 (DBCP 1.5.x) and Java 6 (DBCP 1.4.x), and we abandon DBCP 1.3.
Once Java 8 is released we drop Java 6 support (be it with DBCP 1.x or
DBCP 2.x).
Emmanuel Bourg
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Phil Steitz <ph...@gmail.com>.
On 5/28/13 1:55 PM, Emmanuel Bourg wrote:
> Le 28/05/2013 21:47, Gary Gregory a écrit :
>
>> Something seems out of bounds here. Strictly speaking I know we deliver
>> sources and we provide a jar as a convenience.
>>
>> The source we deliver comes with a clear definition through the POM on how
>> to build it. We say, the source is Java version X and the target Java
>> version Y, where usually X=Y.
> Actually no, it doesn't say that. The source version is not an
> environment specification, it's a language level specification
> (5=generics, 6=@Override in interfaces, 7=Project Coin features, etc).
> And the target version specifies the compatible VMs. There is no
> assumption on the available libraries.
>
>
>> The safe thing to do as a builder is to build with a Java version that
>> matches the source version set in the POM.
> Sure that would be ideal, but that's not the reality. In the real world
> folks have to compile DBCP 1.x with Java 7 because they can't support
> Java 6 any longer.
Only because we have not yet released 2.0. If we focus on doing
that, their problem is solved. That was basically my point above.
Rather than hacking more compile filters so that 1.x can work for 3
different - incompatible - JDBC versions, we should split cleanly.
We are not that far away from being able to release 2.0. Then
whoever wants to target JDK 1.7 can use those sources.
>
>
>> The result of using a new Java version than that is undefined because who
>> knows what future JDKs will require.
> That's our responsibility as developers and maintainers to ensure our
> components are still usable with newer versions of Java. At least for
> the components with a significant user base, and DBCP is clearly one of
> them.
>
> Honestly, if we can't release a Java 7 compatible version of DBCP 1.x we
> should stop pretending that the source code is our primary deliverable,
> because this source code has been broken with the latest version of Java
> for nearly 2 years now.
That I agree with. I am willing to help out and review and apply
patches if we can assemble a few people to penetrate the dbcp2 code
(and the pool2 code it depends on). If others are not willing to
help, we should consider declaring it dormant. Just hacking the 1.x
sources to get things to compile is not real maintenance, IMO, so we
should either decide to actually move this thing forward or declare
it dormant.
Phil
>
>
> Emmanuel Bourg
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Emmanuel Bourg <eb...@apache.org>.
Le 28/05/2013 21:47, Gary Gregory a écrit :
> Something seems out of bounds here. Strictly speaking I know we deliver
> sources and we provide a jar as a convenience.
>
> The source we deliver comes with a clear definition through the POM on how
> to build it. We say, the source is Java version X and the target Java
> version Y, where usually X=Y.
Actually no, it doesn't say that. The source version is not an
environment specification, it's a language level specification
(5=generics, 6=@Override in interfaces, 7=Project Coin features, etc).
And the target version specifies the compatible VMs. There is no
assumption on the available libraries.
> The safe thing to do as a builder is to build with a Java version that
> matches the source version set in the POM.
Sure that would be ideal, but that's not the reality. In the real world
folks have to compile DBCP 1.x with Java 7 because they can't support
Java 6 any longer.
> The result of using a new Java version than that is undefined because who
> knows what future JDKs will require.
That's our responsibility as developers and maintainers to ensure our
components are still usable with newer versions of Java. At least for
the components with a significant user base, and DBCP is clearly one of
them.
Honestly, if we can't release a Java 7 compatible version of DBCP 1.x we
should stop pretending that the source code is our primary deliverable,
because this source code has been broken with the latest version of Java
for nearly 2 years now.
Emmanuel Bourg
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Gary Gregory <ga...@gmail.com>.
On Tue, May 28, 2013 at 3:24 PM, Emmanuel Bourg <eb...@apache.org> wrote:
> Le 28/05/2013 19:50, Phil Steitz a écrit :
>
> > Looks complicated and painful. I would rather put energy into
> > getting dbcp 2.0 out the door and aim for the following:
> >
> > DBCP 1.3.x JDK 1.4-1.5
> > DBCP 1.4.x JDK 1.6
> > DBCP 2.x JDK 1.7
>
> Unfortunately that doesn't solve the issue for the Linux distros
> compiling everything from the source. They have to support softwares
> depending on DBCP 1.x, and as they move to Java 7 they will have to
> support DBCP 1.x with Java 7+ for some time.
>
Something seems out of bounds here. Strictly speaking I know we deliver
sources and we provide a jar as a convenience.
The source we deliver comes with a clear definition through the POM on how
to build it. We say, the source is Java version X and the target Java
version Y, where usually X=Y.
The safe thing to do as a builder is to build with a Java version that
matches the source version set in the POM.
The result of using a new Java version than that is undefined because who
knows what future JDKs will require.
I do not see a nice and clean solution aside from the one suggested by Phil.
Gary
>
>
> Emmanuel Bourg
>
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Emmanuel Bourg <eb...@apache.org>.
Le 28/05/2013 19:50, Phil Steitz a écrit :
> Looks complicated and painful. I would rather put energy into
> getting dbcp 2.0 out the door and aim for the following:
>
> DBCP 1.3.x JDK 1.4-1.5
> DBCP 1.4.x JDK 1.6
> DBCP 2.x JDK 1.7
Unfortunately that doesn't solve the issue for the Linux distros
compiling everything from the source. They have to support softwares
depending on DBCP 1.x, and as they move to Java 7 they will have to
support DBCP 1.x with Java 7+ for some time.
Emmanuel Bourg
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Phil Steitz <ph...@gmail.com>.
On 5/28/13 3:58 AM, Emmanuel Bourg wrote:
> Le 11/01/2013 08:36, Mark Thomas a écrit :
>
>> We could also add the JDBC 4.1 methods to DBCP1 but I'm not sure I like the idea of three builds for that version.
> I think we should do that. Debian and Fedora maintain a patch to be able
> to build DBCP from source (see DBCP-385), but we should assume this burden.
>
> I see 3 options, either:
>
> 1. Release DBCP 1.4.1 with no-op methods throwing a
> SQLFeatureNotSupportedException or an UnsupportedOperationException.
> This is what Fedora/Debian do.
>
> 2. Release DBCP 1.5 with the fully implemented methods and Java 7 as a
> build requirement.
>
> 3. Release DBCP 1.4.1 or 1.5 with the fully implemented methods but
> using reflection, thus compiling with Java 6 or Java 7.
>
>
> What do you think ?
Looks complicated and painful. I would rather put energy into
getting dbcp 2.0 out the door and aim for the following:
DBCP 1.3.x JDK 1.4-1.5
DBCP 1.4.x JDK 1.6
DBCP 2.x JDK 1.7
The 1.4 branch (once the 1.7 stuff is reverted) can still be used to
generate 1.3 releases. Adding on another set of filters is in
theory possible, but painful.
So basically, we cut only pure maintenance releases for 1.3/1.4 and
put the energy into getting 2.0 out.
Phil
>
>
> Emmanuel Bourg
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Emmanuel Bourg <eb...@apache.org>.
Le 11/01/2013 08:36, Mark Thomas a écrit :
> We could also add the JDBC 4.1 methods to DBCP1 but I'm not sure I like the idea of three builds for that version.
I think we should do that. Debian and Fedora maintain a patch to be able
to build DBCP from source (see DBCP-385), but we should assume this burden.
I see 3 options, either:
1. Release DBCP 1.4.1 with no-op methods throwing a
SQLFeatureNotSupportedException or an UnsupportedOperationException.
This is what Fedora/Debian do.
2. Release DBCP 1.5 with the fully implemented methods and Java 7 as a
build requirement.
3. Release DBCP 1.4.1 or 1.5 with the fully implemented methods but
using reflection, thus compiling with Java 6 or Java 7.
What do you think ?
Emmanuel Bourg
Re: [dbcp] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit: r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/ src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/ src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Mark Thomas <ma...@apache.org>.
Phil Steitz <ph...@steitz.com> wrote:
>On 1/10/13 8:57 AM, markt@apache.org wrote:
>> Author: markt
>> Date: Thu Jan 10 16:57:07 2013
>> New Revision: 1431496
>>
>> URL: http://svn.apache.org/viewvc?rev=1431496&view=rev
>> Log:
>> Update DBCP2 to require JDBC 4.1 (Java 7) since Java 6 is close to
>end of life and a DBCP2 release is still a little way off.
>
>Probably should have talked about this on the list. Oh, I guess we
>are. In that case, here is my +1.
>
>Thanks!
That is the beauty of scm. You can always revert problem commits ;)
I refrained from removing the JDBC markers in case there were objections. If none appear before, I'll probably do that some time next week. Fixing the various generics warnings is also on the TODO list as well as looking at the open Jira issues.
We could also add the JDBC 4.1 methods to DBCP1 but I'm not sure I like the idea of three builds for that version.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbco] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Phil Steitz <ph...@gmail.com>.
On 1/11/13 4:55 AM, Jörg Schaible wrote:
> Hi Mark,
>
> Mark Thomas wrote:
>
>> On 11/01/2013 11:31, sebb wrote:
>>> On 11 January 2013 02:38, Phil Steitz <ph...@steitz.com> wrote:
>>>> On 1/10/13 8:57 AM, markt@apache.org wrote:
>>>>> Author: markt
>>>>> Date: Thu Jan 10 16:57:07 2013
>>>>> New Revision: 1431496
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=1431496&view=rev
>>>>> Log:
>>>>> Update DBCP2 to require JDBC 4.1 (Java 7) since Java 6 is close to end
>>>>> of life and a DBCP2 release is still a little way off.
>>>> Probably should have talked about this on the list. Oh, I guess we
>>>> are. In that case, here is my +1.
>>> I don't understand the rationale for requiring JDBC 4.1 - does it
>>> offer significant benefits over the previous version?
>> Nothing significant that I have found so far.
>>
>>> Or is it that applications written to use the previous version of JDBC
>>> won't even run on Java 7?
>> They should run but DBCP won't compile on Java 7 unless the JDBC 4.1
>> methods are implemented (hence the gump nags we have been getting for a
>> while). There is also the risk that an app written compiled against Java
>> 7 tries to use one of the JDBC 4.1 methods. That would trigger a
>> run-time exception.
>>
>>> I know that the JDBC API has been changed in ways that don't respect
>>> upward compatibilty in the past - has that happened again?
>> Yes. As it has with every new JDBC release that I can recall.
>>
>>> Although Java 6 is close to EOL, I suspect a lot of commercial sites
>>> will remain on it long after EOL.
>> There is the option (if someone wants to scratch this particular itch -
>> I don't) to add similar filtering as there is in DBCP1 to support dual
>> builds for JBDC4 and JDBC4.1.
> Why not? DBCP did set the precedence with active 1.3.x and 1.4.x series. No
> reason why we should not have now 1.5.x (JDBC 4.1) and 1.4.x (JDBC 4.0).
> However, I'd skip the maintenance of 1.3.x then.
Patches welcome! I think this would be a good feature to have; but
someone has to actually do the work. I would look carefully at the
question though of whether or not we have to actually split the
series. IIRC, we were forced into in the 1.3/1.4 split by really
incompatible JDBC changes. Just added methods we were able to
accommodate before with filters. In any case, if we ended up
splitting here it would be 2.0.x / 2.1.x.
Phil
>
>> My primary driver is that I want to get a decent concurrent connection
>> pool based on DBCP into Tomcat 8. Tomcat 8 implements Servlet 3.1 which
>> requires Java 7 so I need DBCP2 to build against Java 7 and I'd rather
>> not continue the current hack in the Tomcat build of patching the source
>> to add the methods.
> Cheers,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbco] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit: r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/ src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/ src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Jörg Schaible <Jo...@scalaris.com>.
Hi Mark,
Mark Thomas wrote:
> On 11/01/2013 11:31, sebb wrote:
>> On 11 January 2013 02:38, Phil Steitz <ph...@steitz.com> wrote:
>>> On 1/10/13 8:57 AM, markt@apache.org wrote:
>>>> Author: markt
>>>> Date: Thu Jan 10 16:57:07 2013
>>>> New Revision: 1431496
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1431496&view=rev
>>>> Log:
>>>> Update DBCP2 to require JDBC 4.1 (Java 7) since Java 6 is close to end
>>>> of life and a DBCP2 release is still a little way off.
>>>
>>> Probably should have talked about this on the list. Oh, I guess we
>>> are. In that case, here is my +1.
>>
>> I don't understand the rationale for requiring JDBC 4.1 - does it
>> offer significant benefits over the previous version?
>
> Nothing significant that I have found so far.
>
>> Or is it that applications written to use the previous version of JDBC
>> won't even run on Java 7?
>
> They should run but DBCP won't compile on Java 7 unless the JDBC 4.1
> methods are implemented (hence the gump nags we have been getting for a
> while). There is also the risk that an app written compiled against Java
> 7 tries to use one of the JDBC 4.1 methods. That would trigger a
> run-time exception.
>
>> I know that the JDBC API has been changed in ways that don't respect
>> upward compatibilty in the past - has that happened again?
>
> Yes. As it has with every new JDBC release that I can recall.
>
>> Although Java 6 is close to EOL, I suspect a lot of commercial sites
>> will remain on it long after EOL.
>
> There is the option (if someone wants to scratch this particular itch -
> I don't) to add similar filtering as there is in DBCP1 to support dual
> builds for JBDC4 and JDBC4.1.
Why not? DBCP did set the precedence with active 1.3.x and 1.4.x series. No
reason why we should not have now 1.5.x (JDBC 4.1) and 1.4.x (JDBC 4.0).
However, I'd skip the maintenance of 1.3.x then.
> My primary driver is that I want to get a decent concurrent connection
> pool based on DBCP into Tomcat 8. Tomcat 8 implements Servlet 3.1 which
> requires Java 7 so I need DBCP2 to build against Java 7 and I'd rather
> not continue the current hack in the Tomcat build of patching the source
> to add the methods.
Cheers,
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbco] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by Mark Thomas <ma...@apache.org>.
On 11/01/2013 11:31, sebb wrote:
> On 11 January 2013 02:38, Phil Steitz <ph...@steitz.com> wrote:
>> On 1/10/13 8:57 AM, markt@apache.org wrote:
>>> Author: markt
>>> Date: Thu Jan 10 16:57:07 2013
>>> New Revision: 1431496
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1431496&view=rev
>>> Log:
>>> Update DBCP2 to require JDBC 4.1 (Java 7) since Java 6 is close to end of life and a DBCP2 release is still a little way off.
>>
>> Probably should have talked about this on the list. Oh, I guess we
>> are. In that case, here is my +1.
>
> I don't understand the rationale for requiring JDBC 4.1 - does it
> offer significant benefits over the previous version?
Nothing significant that I have found so far.
> Or is it that applications written to use the previous version of JDBC
> won't even run on Java 7?
They should run but DBCP won't compile on Java 7 unless the JDBC 4.1
methods are implemented (hence the gump nags we have been getting for a
while). There is also the risk that an app written compiled against Java
7 tries to use one of the JDBC 4.1 methods. That would trigger a
run-time exception.
> I know that the JDBC API has been changed in ways that don't respect
> upward compatibilty in the past - has that happened again?
Yes. As it has with every new JDBC release that I can recall.
> Although Java 6 is close to EOL, I suspect a lot of commercial sites
> will remain on it long after EOL.
There is the option (if someone wants to scratch this particular itch -
I don't) to add similar filtering as there is in DBCP1 to support dual
builds for JBDC4 and JDBC4.1.
My primary driver is that I want to get a decent concurrent connection
pool based on DBCP into Tomcat 8. Tomcat 8 implements Servlet 3.1 which
requires Java 7 so I need DBCP2 to build against Java 7 and I'd rather
not continue the current hack in the Tomcat build of patching the source
to add the methods.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [dbco] update DBCP2 to require JDBC 4.1 (Java 7) WAS svn commit:
r1431496 - in /commons/proper/dbcp/trunk: ./ src/java/org/apache/commons/dbcp2/
src/java/org/apache/commons/dbcp2/cpdsadapter/ src/java/org/apache/commons/dbcp2/datasources/
src/test/org/apache/commons/dbcp2/ src/test/org/apache/commons/dbc...
Posted by sebb <se...@gmail.com>.
On 11 January 2013 02:38, Phil Steitz <ph...@steitz.com> wrote:
> On 1/10/13 8:57 AM, markt@apache.org wrote:
>> Author: markt
>> Date: Thu Jan 10 16:57:07 2013
>> New Revision: 1431496
>>
>> URL: http://svn.apache.org/viewvc?rev=1431496&view=rev
>> Log:
>> Update DBCP2 to require JDBC 4.1 (Java 7) since Java 6 is close to end of life and a DBCP2 release is still a little way off.
>
> Probably should have talked about this on the list. Oh, I guess we
> are. In that case, here is my +1.
I don't understand the rationale for requiring JDBC 4.1 - does it
offer significant benefits over the previous version?
Or is it that applications written to use the previous version of JDBC
won't even run on Java 7?
I know that the JDBC API has been changed in ways that don't respect
upward compatibilty in the past - has that happened again?
Although Java 6 is close to EOL, I suspect a lot of commercial sites
will remain on it long after EOL.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org