[c3p0] Added patch for building with JDBC 4.1/Java 7
Deepak Bhole
dbhole at fedoraproject.org
Tue Jan 24 17:56:40 UTC 2012
commit 8857d9de0b424ee1ec7d76f8a959e9885bf3da63
Author: Deepak Bhole <dbhole at redhat.com>
Date: Tue Jan 24 12:56:19 2012 -0500
Added patch for building with JDBC 4.1/Java 7
c3p0-build-on-1.7.patch | 260 +++++++++++++++++++++++++++++++++++++++++++++++
c3p0.spec | 11 ++-
2 files changed, 269 insertions(+), 2 deletions(-)
---
diff --git a/c3p0-build-on-1.7.patch b/c3p0-build-on-1.7.patch
new file mode 100644
index 0000000..1c06bfc
--- /dev/null
+++ b/c3p0-build-on-1.7.patch
@@ -0,0 +1,260 @@
+diff -up ./src/java/com/mchange/v2/c3p0/ComboPooledDataSource.java.sav ./src/java/com/mchange/v2/c3p0/ComboPooledDataSource.java
+--- ./src/java/com/mchange/v2/c3p0/ComboPooledDataSource.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/ComboPooledDataSource.java 2012-01-24 12:55:21.000000000 -0500
+@@ -597,6 +597,10 @@ public final class ComboPooledDataSource
+ throw new SQLException("no object found");
+ }
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+
+ //now, referenceability happens exactly the same way it does for PoolBackedDataSource
+diff -up ./src/java/com/mchange/v2/c3p0/DriverManagerDataSource.java.sav ./src/java/com/mchange/v2/c3p0/DriverManagerDataSource.java
+--- ./src/java/com/mchange/v2/c3p0/DriverManagerDataSource.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/DriverManagerDataSource.java 2012-01-24 12:55:21.000000000 -0500
+@@ -271,4 +271,9 @@ public final class DriverManagerDataSour
+ throw new SQLException("no object found");
+ }
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
+ }
+diff -up ./src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnection.java.sav ./src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnection.java
+--- ./src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnection.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnection.java 2012-01-24 12:55:21.000000000 -0500
+@@ -800,8 +800,18 @@ public final class C3P0PooledConnection
+ {
+ throw new RuntimeException(new NoSuchMethodException("stub method"));
+ }
++
++ public Object getObject(String columnLabel, Class type) throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public Object getObject(int columnNumber, Class type) throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
+ }
+
++
+ /*
+ * TODO: factor all this convolution out into
+ * C3P0Statement
+@@ -1245,6 +1255,22 @@ public final class C3P0PooledConnection
+ {
+ throw new SQLFeatureNotSupportedException();
+ }
++
++ public void closeOnCompletion() throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public boolean isCloseOnCompletion() throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public Object getObject(String columnLabel, Class type) throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public Object getObject(int columnNumber, Class type) throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+
+ return new ProxyCallableStatement((CallableStatement) innerStmt );
+@@ -1408,9 +1434,17 @@ public final class C3P0PooledConnection
+ public void setRowId( int i, RowId r ) throws SQLFeatureNotSupportedException
+ {
+ throw new SQLFeatureNotSupportedException();
+- }
+ }
+
++ public void closeOnCompletion() throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public boolean isCloseOnCompletion() throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++ }
++
+ return new ProxyPreparedStatement((PreparedStatement) innerStmt );
+ }
+ else
+@@ -1477,6 +1511,14 @@ public final class C3P0PooledConnection
+ // should people be calling unwrap if isWrapperFor returns false?
+ return null;
+ }
++
++ public void closeOnCompletion() throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public boolean isCloseOnCompletion() throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+
+ return new ProxyStatement( innerStmt );
+@@ -1939,5 +1981,5 @@ public final class C3P0PooledConnection
+ public void removeStatementEventListener( StatementEventListener listener )
+ {
+ throw new NoSuchMethodError("stub method");
+- }
++ }
+ }
+diff -up ./src/java/com/mchange/v2/c3p0/impl/NullStatementSetManagedResultSet.java.sav ./src/java/com/mchange/v2/c3p0/impl/NullStatementSetManagedResultSet.java
+--- ./src/java/com/mchange/v2/c3p0/impl/NullStatementSetManagedResultSet.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/impl/NullStatementSetManagedResultSet.java 2012-01-24 12:55:21.000000000 -0500
+@@ -314,4 +314,12 @@ public int getHoldability()
+ {
+ throw new RuntimeException(new NoSuchMethodException("stub method"));
+ }
++
++ public Object getObject(String columnLabel, Class type) throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public Object getObject(int columnNumber, Class type) throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+diff -up ./src/java/com/mchange/v2/c3p0/impl/SetManagedDatabaseMetaData.java.sav ./src/java/com/mchange/v2/c3p0/impl/SetManagedDatabaseMetaData.java
+--- ./src/java/com/mchange/v2/c3p0/impl/SetManagedDatabaseMetaData.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/impl/SetManagedDatabaseMetaData.java 2012-01-24 12:55:21.000000000 -0500
+@@ -181,4 +181,15 @@ final class SetManagedDatabaseMetaData e
+ {
+ throw new RuntimeException(new NoSuchMethodException("stub method"));
+ }
++
++ public boolean generatedKeyAlwaysReturned() throws java.sql.SQLException
++ {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public ResultSet getPseudoColumns(String catalog, String schemaPattern,
++ String tableNamePattern, String columnNamePattern) throws java.sql.SQLException
++ {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+diff -up ./src/java/com/mchange/v2/c3p0/impl/SnatchFromSetResultSet.java.sav ./src/java/com/mchange/v2/c3p0/impl/SnatchFromSetResultSet.java
+--- ./src/java/com/mchange/v2/c3p0/impl/SnatchFromSetResultSet.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/impl/SnatchFromSetResultSet.java 2012-01-24 12:55:21.000000000 -0500
+@@ -310,4 +310,12 @@ final class SnatchFromSetResultSet exten
+ {
+ throw new RuntimeException(new NoSuchMethodException("stub method"));
+ }
++
++ public Object getObject(String columnLabel, Class type) throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
++
++ public Object getObject(int columnNumber, Class type) throws java.sql.SQLException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+diff -up ./src/java/com/mchange/v2/c3p0/JndiRefConnectionPoolDataSource.java.sav ./src/java/com/mchange/v2/c3p0/JndiRefConnectionPoolDataSource.java
+--- ./src/java/com/mchange/v2/c3p0/JndiRefConnectionPoolDataSource.java.sav 2010-05-27 01:01:04.000000000 -0400
++++ ./src/java/com/mchange/v2/c3p0/JndiRefConnectionPoolDataSource.java 2012-01-24 12:55:22.000000000 -0500
+@@ -307,5 +307,9 @@ public final class JndiRefConnectionPool
+ sb.append("]");
+ return sb.toString();
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+
+diff -up ./src/java/com/mchange/v2/c3p0/JndiRefForwardingDataSource.java.sav ./src/java/com/mchange/v2/c3p0/JndiRefForwardingDataSource.java
+--- ./src/java/com/mchange/v2/c3p0/JndiRefForwardingDataSource.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/JndiRefForwardingDataSource.java 2012-01-24 12:55:22.000000000 -0500
+@@ -185,5 +185,9 @@ final class JndiRefForwardingDataSource
+ throw new SQLException("no object found");
+ }
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+
+diff -up ./src/java/com/mchange/v2/c3p0/PoolBackedDataSource.java.sav ./src/java/com/mchange/v2/c3p0/PoolBackedDataSource.java
+--- ./src/java/com/mchange/v2/c3p0/PoolBackedDataSource.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/PoolBackedDataSource.java 2012-01-24 12:55:22.000000000 -0500
+@@ -52,5 +52,9 @@ public final class PoolBackedDataSource
+ throw new SQLException("no object found");
+ }
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+
+diff -up ./src/java/com/mchange/v2/c3p0/test/FreezableDriverManagerDataSource.java.sav ./src/java/com/mchange/v2/c3p0/test/FreezableDriverManagerDataSource.java
+--- ./src/java/com/mchange/v2/c3p0/test/FreezableDriverManagerDataSource.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/test/FreezableDriverManagerDataSource.java 2012-01-24 12:55:22.000000000 -0500
+@@ -300,4 +300,8 @@ public final class FreezableDriverManage
+ throw new SQLException("no object found");
+ }
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
+diff -up ./src/java/com/mchange/v2/c3p0/util/CloseReportingConnectionWrapper.java.sav ./src/java/com/mchange/v2/c3p0/util/CloseReportingConnectionWrapper.java
+--- ./src/java/com/mchange/v2/c3p0/util/CloseReportingConnectionWrapper.java.sav 2012-01-24 12:55:18.000000000 -0500
++++ ./src/java/com/mchange/v2/c3p0/util/CloseReportingConnectionWrapper.java 2012-01-24 12:55:22.000000000 -0500
+@@ -107,4 +107,29 @@ public class CloseReportingConnectionWra
+ {
+ throw new RuntimeException(new NoSuchMethodException("stub method"));
+ }
++
++ public int getNetworkTimeout() throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNetworkTimeout(java.util.concurrent.Executor executor, int milliseconds) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void abort(java.util.concurrent.Executor executor) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public String getSchema() throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setSchema(String schema) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
+ }
+diff -up ./src/java/com/mchange/v2/c3p0/WrapperConnectionPoolDataSource.java.sav ./src/java/com/mchange/v2/c3p0/WrapperConnectionPoolDataSource.java
+--- ./src/java/com/mchange/v2/c3p0/WrapperConnectionPoolDataSource.java.sav 2010-05-27 01:01:04.000000000 -0400
++++ ./src/java/com/mchange/v2/c3p0/WrapperConnectionPoolDataSource.java 2012-01-24 12:55:22.000000000 -0500
+@@ -283,4 +283,8 @@ public final class WrapperConnectionPool
+ else
+ this.connectionTester = C3P0ImplUtils.defaultConnectionTester();
+ }
++
++ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
++ throw new java.sql.SQLFeatureNotSupportedException();
++ }
+ }
diff --git a/c3p0.spec b/c3p0.spec
index a60b7b5..a29ae9f 100644
--- a/c3p0.spec
+++ b/c3p0.spec
@@ -2,7 +2,7 @@
Name: c3p0
Version: 0.9.2
-Release: 0.6.%{prerel}%{?dist}
+Release: 0.7.%{prerel}%{?dist}
Summary: JDBC DataSources/Resource Pools
License: LGPLv2
URL: http://sourceforge.net/projects/c3p0
@@ -26,6 +26,9 @@ Source1: c3p0.pom
# Patch to build on java 1.6
Patch0: %{name}-build-on-1.6.patch
+# Patch to build on java 1.7 (intentionally kept separate from above)
+Patch1: %{name}-build-on-1.7.patch
+
BuildArch: noarch
%description
@@ -46,7 +49,8 @@ Requires: java-javadoc
%prep
%setup -q -n %{name}-%{version}-%{prerel}.src
-%patch0 -p0 -b .orig
+%patch0 -p0 -b .java6
+%patch1 -p0 -b .java7
# remove all binary bits
find -name '*.class' -exec rm -f '{}' \;
@@ -91,6 +95,9 @@ install -pD -m 644 -T %{SOURCE1} \
%{_javadocdir}/%{name}
%changelog
+* Tue Jan 24 2012 Deepak Bhole <dbhole at redhat.com> 0.9.2-0.7.pre1
+- Added patch for building with JDBC 4.1/Java 7
+
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.2-0.6.pre1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list