[c3p0/f15] Initial commit of c3p0 package.
mbooth
mbooth at fedoraproject.org
Fri Jul 29 16:02:39 UTC 2011
commit 0fd6c74dcf9621ffe47fae40afc44a75740b2834
Author: mbooth <mbooth at fedoraproject.org>
Date: Fri Jul 29 17:00:40 2011 +0100
Initial commit of c3p0 package.
.gitignore | 1 +
c3p0-build-on-1.6.patch | 1828 +++++++++++++++++++++++++++++++++++++++++++++++
c3p0.pom | 24 +
c3p0.spec | 110 +++
sources | 1 +
5 files changed, 1964 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..7d954ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/c3p0-0.9.2-pre1.src.tgz
diff --git a/c3p0-build-on-1.6.patch b/c3p0-build-on-1.6.patch
new file mode 100644
index 0000000..c830cd1
--- /dev/null
+++ b/c3p0-build-on-1.6.patch
@@ -0,0 +1,1828 @@
+diff --git src/java/com/mchange/v2/c3p0/ComboPooledDataSource.java src/java/com/mchange/v2/c3p0/ComboPooledDataSource.java
+index d86ff2d..7b65881 100644
+--- src/java/com/mchange/v2/c3p0/ComboPooledDataSource.java
++++ src/java/com/mchange/v2/c3p0/ComboPooledDataSource.java
+@@ -582,6 +582,21 @@
+ throw new IOException("Unsupported Serialized Version: " + version);
+ }
+ }
++
++ public boolean isWrapperFor( Class iface )
++ {
++ return iface.isInstance(this);
++ }
++
++ public Object unwrap( Class iface ) throws SQLException
++ {
++ if (this.isWrapperFor(iface)) {
++ return this;
++ }
++ else {
++ throw new SQLException("no object found");
++ }
++ }
+ }
+
+ //now, referenceability happens exactly the same way it does for PoolBackedDataSource
+diff --git src/java/com/mchange/v2/c3p0/DriverManagerDataSource.java src/java/com/mchange/v2/c3p0/DriverManagerDataSource.java
+index 8e604c4..7adad84 100644
+--- src/java/com/mchange/v2/c3p0/DriverManagerDataSource.java
++++ src/java/com/mchange/v2/c3p0/DriverManagerDataSource.java
+@@ -256,4 +256,19 @@
+ throw new IOException("Unsupported Serialized Version: " + version);
+ }
+ }
++
++ public boolean isWrapperFor( Class iface )
++ {
++ return iface.isInstance(this);
++ }
++
++ public Object unwrap( Class iface ) throws SQLException
++ {
++ if (this.isWrapperFor(iface)) {
++ return this;
++ }
++ else {
++ throw new SQLException("no object found");
++ }
++ }
+ }
+diff --git src/java/com/mchange/v2/c3p0/JndiRefForwardingDataSource.java src/java/com/mchange/v2/c3p0/JndiRefForwardingDataSource.java
+index c1c7d47..0a0cf34 100644
+--- src/java/com/mchange/v2/c3p0/JndiRefForwardingDataSource.java
++++ src/java/com/mchange/v2/c3p0/JndiRefForwardingDataSource.java
+@@ -165,5 +165,25 @@
+ throw new IOException("Unsupported Serialized Version: " + version);
+ }
+ }
++
++ public boolean isWrapperFor( Class iface ) throws SQLException
++ {
++ return iface.isInstance(this) || iface.isInstance(inner());
++ }
++
++ public Object unwrap( Class iface ) throws SQLException
++ {
++ if (this.isWrapperFor(iface)) {
++ if (iface.isInstance(this)) {
++ return this;
++ }
++ else {
++ return inner();
++ }
++ }
++ else {
++ throw new SQLException("no object found");
++ }
++ }
+ }
+
+diff --git src/java/com/mchange/v2/c3p0/PoolBackedDataSource.java src/java/com/mchange/v2/c3p0/PoolBackedDataSource.java
+index 8520bd9..f6d93cd 100644
+--- src/java/com/mchange/v2/c3p0/PoolBackedDataSource.java
++++ src/java/com/mchange/v2/c3p0/PoolBackedDataSource.java
+@@ -23,6 +23,8 @@
+
+ package com.mchange.v2.c3p0;
+
++import java.sql.SQLException;
++
+ import com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource;
+
+ public final class PoolBackedDataSource extends AbstractPoolBackedDataSource implements PooledDataSource
+@@ -35,5 +37,20 @@
+
+ public PoolBackedDataSource(String configName)
+ { super( configName ); }
++
++ public boolean isWrapperFor( Class iface )
++ {
++ return iface.isInstance(this);
++ }
++
++ public Object unwrap( Class iface ) throws SQLException
++ {
++ if (this.isWrapperFor(iface)) {
++ return this;
++ }
++ else {
++ throw new SQLException("no object found");
++ }
++ }
+ }
+
+diff --git src/java/com/mchange/v2/c3p0/codegen/JdbcProxyGenerator.java src/java/com/mchange/v2/c3p0/codegen/JdbcProxyGenerator.java
+index 984a07d..8c736ce 100644
+--- src/java/com/mchange/v2/c3p0/codegen/JdbcProxyGenerator.java
++++ src/java/com/mchange/v2/c3p0/codegen/JdbcProxyGenerator.java
+@@ -831,7 +831,7 @@
+ }
+ // end-premature-detach-debug-only!
+
+- iw.println( "throw SqlUtils.toSQLException(\042You can't operate on a closed " + getInnerTypeName() + "!!!\042, exc);");
++ iw.println( "throw new IllegalStateException(SqlUtils.toSQLException(\042You can't operate on a closed " + getInnerTypeName() + "!!!\042, exc));");
+ }
+ iw.downIndent();
+ iw.println("}");
+@@ -845,10 +845,10 @@
+ iw.println("{");
+ iw.upIndent();
+ //iw.println( "exc.printStackTrace();" );
+- iw.println( "throw parentPooledConnection.handleThrowable( exc );" );
++ iw.println( "throw new RuntimeException(parentPooledConnection.handleThrowable( exc ));" );
+ iw.downIndent();
+ iw.println("}");
+- iw.println("else throw SqlUtils.toSQLException( exc );");
++ iw.println("else throw new RuntimeException(SqlUtils.toSQLException( exc ));");
+ iw.downIndent();
+ iw.println("}");
+ }
+diff --git src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnection.java src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnection.java
+index 78336bd..fd20ab2 100644
+--- src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnection.java
++++ src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnection.java
+@@ -24,6 +24,8 @@
+ package com.mchange.v2.c3p0.impl;
+
+ import java.lang.reflect.*;
++import java.io.InputStream;
++import java.io.Reader;
+ import java.sql.*;
+ import java.util.*;
+ import javax.sql.*;
+@@ -521,6 +523,7 @@
+ private static class StatementProxyingSetManagedResultSet extends SetManagedResultSet
+ {
+ private Statement proxyStatement;
++ private boolean closed = false;
+
+ StatementProxyingSetManagedResultSet(Set activeResultSets)
+ { super( activeResultSets ); }
+@@ -530,6 +533,273 @@
+
+ public Statement getStatement() throws SQLException
+ { return (proxyStatement == null ? super.getStatement() : proxyStatement); }
++
++ public boolean isWrapperFor( Class c ) throws SQLException
++ {
++ return c.isInstance(this) || c.isInstance(this.proxyStatement) || c.isInstance(super.getStatement());
++ }
++
++ public Object unwrap( Class c ) throws SQLException
++ {
++ if (c.isInstance(this)) {
++ return this;
++ }
++ else if (c.isInstance(this.proxyStatement)) {
++ return this.proxyStatement;
++ }
++ else if (c.isInstance(super.getStatement())) {
++ return super.getStatement();
++ }
++ // should people be calling unwrap if isWrapperFor would return false?
++ return null;
++ }
++
++ public void updateNClob( String column, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( String s, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( String s, NClob nc ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( int i, NClob nc ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateClob( String s, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateClob( String s, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateClob( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateClob( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBlob( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBlob( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBlob( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBlob( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateCharacterStream( String s, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateCharacterStream( String s, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateCharacterStream( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateCharacterStream( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBinaryStream( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBinaryStream( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBinaryStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBinaryStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateAsciiStream( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateAsciiStream( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateAsciiStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateAsciiStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNCharacterStream( String s, Reader r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNCharacterStream( String s, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNCharacterStream( int i, Reader r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNCharacterStream( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateSQLXML( String s, SQLXML sx ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateSQLXML( int i, SQLXML sx ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNString( String label, String value ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNString( int i, String value ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateRowId( String s, RowId x ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateRowId( int i, RowId x ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Reader getNCharacterStream( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Reader getNCharacterStream( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public String getNString( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public String getNString( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public SQLXML getSQLXML( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public SQLXML getSQLXML( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public NClob getNClob( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public NClob getNClob( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public RowId getRowId( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public RowId getRowId( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public synchronized void close() throws SQLException
++ {
++ closed = true;
++ super.close();
++ }
++
++ public boolean isClosed()
++ {
++ return closed;
++ }
++
++ // stub methods - required by java.sql.ResultSet since 1.6
++ public int getHoldability()
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
+ }
+
+ /*
+@@ -636,6 +906,7 @@
+ class ProxyCallableStatement extends FilterCallableStatement implements C3P0ProxyStatement
+ {
+ WrapperStatementHelper wsh;
++ private boolean closed = false;
+
+ ProxyCallableStatement(CallableStatement is)
+ {
+@@ -663,7 +934,317 @@
+ { return wsh.doRawStatementOperation( m, target, args); }
+
+ public void close() throws SQLException
+- { wsh.doClose(); }
++ {
++ closed = true;
++ wsh.doClose();
++ }
++
++ public boolean isClosed()
++ {
++ return closed;
++ }
++
++ public void setPoolable( boolean poolable )
++ {
++ // do nothing
++ }
++
++ public boolean isPoolable()
++ {
++ return true;
++ }
++
++ public boolean isWrapperFor( Class c )
++ {
++ return c.isInstance(this) || c.isInstance(wsh);
++ }
++
++ public Object unwrap( Class c )
++ {
++ if (c.isInstance(this)) {
++ return this;
++ }
++ else if (c.isInstance(wsh)) {
++ return wsh;
++ }
++ // should people be calling unwrap if isWrapperFor would return false?
++ return null;
++ }
++
++ public void setNClob( String parameter, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNClob( String s, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNClob( String s, NClob nc ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNClob( int i, Reader r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNClob( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNClob( int i, NClob nc ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBlob( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBlob( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBlob( String s, Blob b ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBlob( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBlob( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBlob( int i, Blob b ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setClob( String s, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setClob( String s, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setClob( String s, Clob c ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setClob( int i, Reader r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setClob( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setClob( int i, Clob c ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNCharacterStream( String s, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNCharacterStream( String s, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNCharacterStream( int i, Reader r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNCharacterStream( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setCharacterStream( String s, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setCharacterStream( String s, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setCharacterStream( int i, Reader r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setCharacterStream( int i, Reader r, int l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setCharacterStream( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBinaryStream( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBinaryStream( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBinaryStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBinaryStream( int i, InputStream inp, int l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBinaryStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setAsciiStream( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setAsciiStream( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setAsciiStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setAsciiStream( int i, InputStream inp, int l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setAsciiStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNString( String name, String value ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNString( int i, String value ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setSQLXML( String s, SQLXML sx ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setSQLXML( int i, SQLXML sx ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setRowId( String s, RowId r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setRowId( int i, RowId r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Reader getCharacterStream( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Reader getCharacterStream( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Reader getNCharacterStream( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Reader getNCharacterStream( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public String getNString( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public String getNString( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public SQLXML getSQLXML( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public SQLXML getSQLXML( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public NClob getNClob( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public NClob getNClob( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public RowId getRowId( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public RowId getRowId( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
+ }
+
+ return new ProxyCallableStatement((CallableStatement) innerStmt );
+@@ -673,6 +1254,7 @@
+ class ProxyPreparedStatement extends FilterPreparedStatement implements C3P0ProxyStatement
+ {
+ WrapperStatementHelper wsh;
++ private boolean closed = false;
+
+ ProxyPreparedStatement(PreparedStatement ps)
+ {
+@@ -700,7 +1282,133 @@
+ { return wsh.doRawStatementOperation( m, target, args); }
+
+ public void close() throws SQLException
+- { wsh.doClose(); }
++ {
++ closed = true;
++ wsh.doClose();
++ }
++
++ public boolean isClosed()
++ {
++ return closed;
++ }
++
++ public boolean isWrapperFor( Class c )
++ {
++ return c.isInstance(this) || c.isInstance(wsh);
++ }
++
++ public Object unwrap( Class c )
++ {
++ if (c.isInstance(this)) {
++ return this;
++ }
++ else if (c.isInstance(wsh)) {
++ return wsh;
++ }
++ // should people be calling unwrap if isWrapperFor would return false?
++ return null;
++ }
++
++ public void setPoolable( boolean poolable )
++ {
++ // do nothing
++ return;
++ }
++
++ public boolean isPoolable()
++ {
++ return true;
++ }
++
++ public void setNClob( int parameter, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNClob( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNClob( int i, NClob nc ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBlob( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBlob( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setClob( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setClob( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNCharacterStream( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNCharacterStream( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setCharacterStream( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setCharacterStream( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBinaryStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setBinaryStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setAsciiStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setAsciiStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setSQLXML( int i, SQLXML sx ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setNString( int i, String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void setRowId( int i, RowId r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
+ }
+
+ return new ProxyPreparedStatement((PreparedStatement) innerStmt );
+@@ -710,6 +1418,7 @@
+ class ProxyStatement extends FilterStatement implements C3P0ProxyStatement
+ {
+ WrapperStatementHelper wsh;
++ boolean closed = false;
+
+ ProxyStatement(Statement s)
+ {
+@@ -734,7 +1443,40 @@
+ { return wsh.doRawStatementOperation( m, target, args); }
+
+ public void close() throws SQLException
+- { wsh.doClose(); }
++ {
++ wsh.doClose();
++ closed = true;
++ }
++
++ public boolean isPoolable()
++ {
++ return true;
++ }
++
++ public void setPoolable( boolean poolable )
++ {
++ // do nothing
++ return;
++ }
++
++ public boolean isClosed()
++ {
++ return closed;
++ }
++
++ public boolean isWrapperFor( Class c )
++ {
++ return c.isInstance(this);
++ }
++
++ public Object unwrap( Class c )
++ {
++ if (this.isWrapperFor(c)) {
++ return this;
++ }
++ // should people be calling unwrap if isWrapperFor returns false?
++ return null;
++ }
+ }
+
+ return new ProxyStatement( innerStmt );
+@@ -1187,11 +1929,15 @@
+ logger.log(MLevel.WARNING, "Broken Connection Close Error. ", e);
+ }
+ }
+-}
+
++// stub methods, required by javax.sql.PooledConnection since 1.6
++ public void addStatementEventListener( StatementEventListener listener )
++ {
++ throw new NoSuchMethodError("stub method");
++ }
+
+-
+-
+-
+-
+-
++ public void removeStatementEventListener( StatementEventListener listener )
++ {
++ throw new NoSuchMethodError("stub method");
++ }
++}
+diff --git src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnectionPoolManager.java src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnectionPoolManager.java
+index cfe9c88..584eedc 100644
+--- src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnectionPoolManager.java
++++ src/java/com/mchange/v2/c3p0/impl/C3P0PooledConnectionPoolManager.java
+@@ -23,21 +23,43 @@
+
+ package com.mchange.v2.c3p0.impl;
+
+-import java.beans.*;
+-import java.util.*;
+-import java.lang.reflect.*;
+-import java.sql.*;
+-import javax.sql.*;
+-import com.mchange.v2.c3p0.*;
+-import com.mchange.v2.c3p0.cfg.*;
+-import com.mchange.v2.async.*;
+-import com.mchange.v2.coalesce.*;
+-import com.mchange.v1.db.sql.*;
+-import com.mchange.v2.log.*;
++import java.beans.BeanInfo;
++import java.beans.Introspector;
++import java.beans.PropertyDescriptor;
++import java.lang.reflect.Method;
++import java.sql.Connection;
++import java.sql.DatabaseMetaData;
++import java.sql.PreparedStatement;
++import java.sql.ResultSet;
++import java.sql.SQLException;
++import java.util.Collections;
++import java.util.HashMap;
++import java.util.Iterator;
++import java.util.Map;
++import java.util.Set;
++import java.util.Timer;
++
++import javax.sql.ConnectionPoolDataSource;
++import javax.sql.PooledConnection;
++
++import com.mchange.v1.db.sql.ConnectionUtils;
++import com.mchange.v1.db.sql.ResultSetUtils;
++import com.mchange.v1.db.sql.StatementUtils;
+ import com.mchange.v1.lang.BooleanUtils;
++import com.mchange.v2.async.ThreadPoolAsynchronousRunner;
++import com.mchange.v2.c3p0.C3P0Registry;
++import com.mchange.v2.c3p0.ConnectionCustomizer;
++import com.mchange.v2.c3p0.ConnectionTester;
++import com.mchange.v2.c3p0.cfg.C3P0Config;
++import com.mchange.v2.coalesce.CoalesceChecker;
++import com.mchange.v2.coalesce.Coalescer;
++import com.mchange.v2.coalesce.CoalescerFactory;
++import com.mchange.v2.log.MLevel;
++import com.mchange.v2.log.MLog;
++import com.mchange.v2.log.MLogger;
++import com.mchange.v2.resourcepool.BasicResourcePoolFactory;
++import com.mchange.v2.resourcepool.ResourcePoolFactory;
+ import com.mchange.v2.sql.SqlUtils;
+-import com.mchange.v2.resourcepool.ResourcePoolFactory;
+-import com.mchange.v2.resourcepool.BasicResourcePoolFactory;
+
+ public final class C3P0PooledConnectionPoolManager
+ {
+@@ -125,11 +147,10 @@
+ // after the hung thread has been cleared and replaced
+ // (in hopes of getting the thread to terminate for
+ // garbage collection)
+- timer,
+- threadLabel );
++ timer );
+ }
+ else
+- out = new ThreadPoolAsynchronousRunner( num_threads, true, timer, threadLabel );
++ out = new ThreadPoolAsynchronousRunner( num_threads, true, timer );
+
+ return out;
+ }
+diff --git src/java/com/mchange/v2/c3p0/impl/NewPooledConnection.java src/java/com/mchange/v2/c3p0/impl/NewPooledConnection.java
+index cc83c54..604003c 100644
+--- src/java/com/mchange/v2/c3p0/impl/NewPooledConnection.java
++++ src/java/com/mchange/v2/c3p0/impl/NewPooledConnection.java
+@@ -777,4 +777,15 @@
+ }
+ }
+ }
++
++// stub methods, required by javax.sql.PooledConnection since 1.6
++ public void addStatementEventListener( StatementEventListener listener )
++ {
++ throw new NoSuchMethodError("stub method");
++ }
++
++ public void removeStatementEventListener( StatementEventListener listener )
++ {
++ throw new NoSuchMethodError("stub method");
++ }
+ }
+diff --git src/java/com/mchange/v2/c3p0/impl/NullStatementSetManagedResultSet.java src/java/com/mchange/v2/c3p0/impl/NullStatementSetManagedResultSet.java
+index 3411698..7d4be76 100644
+--- src/java/com/mchange/v2/c3p0/impl/NullStatementSetManagedResultSet.java
++++ src/java/com/mchange/v2/c3p0/impl/NullStatementSetManagedResultSet.java
+@@ -29,19 +29,289 @@
+ */
+ package com.mchange.v2.c3p0.impl;
+
++import java.io.InputStream;
++import java.io.Reader;
++import java.sql.NClob;
+ import java.sql.ResultSet;
++import java.sql.RowId;
++import java.sql.SQLException;
++import java.sql.SQLFeatureNotSupportedException;
++import java.sql.SQLXML;
+ import java.sql.Statement;
+ import java.util.Set;
+
+
+ final class NullStatementSetManagedResultSet extends SetManagedResultSet
+ {
++private boolean closed = false;
++
+ NullStatementSetManagedResultSet(Set activeResultSets)
+ { super( activeResultSets ); }
+
+ NullStatementSetManagedResultSet(ResultSet inner, Set activeResultSets)
+ { super( inner, activeResultSets); }
++
++public boolean isWrapperFor( Class c )
++{
++ return c.isInstance(this);
++}
++
++public Object unwrap( Class c )
++{
++ if (c.isInstance(this)) {
++ return this;
++ }
++ // should people be calling unwrap when isWrapperFor would return false
++ return null;
++}
+
+ public Statement getStatement()
+ { return null; }
++
++public synchronized void close() throws SQLException
++{
++ closed = true;
++ super.close();
++}
++
++public boolean isClosed()
++{
++ return closed;
++}
++
++public void updateNClob( String column, Reader reader ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNClob( String column, Reader reader, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNClob( String column, NClob nc ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNClob( int i, Reader reader ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNClob( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNClob( int i, NClob nc ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateClob( String s, Reader reader ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateClob( String s, Reader r, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateClob( int i, Reader reader ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateClob( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateBlob( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateBlob( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateBlob( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateBlob( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateCharacterStream( String s, Reader reader ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateCharacterStream( String s, Reader reader, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateCharacterStream( int i, Reader reader ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateCharacterStream( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateBinaryStream( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateBinaryStream( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateBinaryStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateBinaryStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateAsciiStream( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateAsciiStream( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateAsciiStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateAsciiStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNCharacterStream( String s, Reader reader ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNCharacterStream( String s, Reader reader, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNCharacterStream( int i, Reader reader ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNCharacterStream( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateSQLXML( String s, SQLXML sx ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateSQLXML( int i, SQLXML sx ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNString( String label, String value ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateNString( int i, String value ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateRowId( String s, RowId x ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public void updateRowId( int i, RowId x ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public Reader getNCharacterStream( int i ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public Reader getNCharacterStream( String s ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public String getNString( int i ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public String getNString( String s ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public SQLXML getSQLXML( int i ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public SQLXML getSQLXML( String s ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public NClob getNClob( int i ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public NClob getNClob( String s ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public RowId getRowId( String s ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++public RowId getRowId( int i ) throws SQLFeatureNotSupportedException
++{
++ throw new SQLFeatureNotSupportedException();
++}
++
++// stub methods - required by java.sql.ResultSet since 1.6
++public int getHoldability()
++{
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++}
+ }
+diff --git src/java/com/mchange/v2/c3p0/impl/SetManagedDatabaseMetaData.java src/java/com/mchange/v2/c3p0/impl/SetManagedDatabaseMetaData.java
+index 8dbdd2d..e9b16be 100644
+--- src/java/com/mchange/v2/c3p0/impl/SetManagedDatabaseMetaData.java
++++ src/java/com/mchange/v2/c3p0/impl/SetManagedDatabaseMetaData.java
+@@ -131,6 +131,54 @@
+ {
+ return new NullStatementSetManagedResultSet( inner.getUDTs(a, b, c, d), activeResultSets );
+ }
+-}
++
++ public boolean isWrapperFor( Class c )
++ {
++ return c.isInstance(this);
++ }
++
++ public Object unwrap( Class c )
++ {
++ if (this.isWrapperFor(c)) {
++ return this;
++ }
++ // should people be calling unwrap if isWrapperFor would return false?
++ return null;
++ }
++
++ // stub method required by java.sql.DatabaseMetaData since 1.6
++ public ResultSet getFunctionColumns( String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern )
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++
++ public ResultSet getFunctions( String catalog, String schemaPattern, String functionNamePattern )
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++
++ public ResultSet getClientInfoProperties()
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++
++ public boolean autoCommitFailureClosesAllResultSets()
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++
++ public boolean supportsStoredFunctionsUsingCallSyntax()
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
+
++ public ResultSet getSchemas( String catalog, String schemaPattern )
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
+
++ public RowIdLifetime getRowIdLifetime()
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++}
+diff --git src/java/com/mchange/v2/c3p0/impl/SnatchFromSetResultSet.java src/java/com/mchange/v2/c3p0/impl/SnatchFromSetResultSet.java
+index a0fb051..cada2b1 100644
+--- src/java/com/mchange/v2/c3p0/impl/SnatchFromSetResultSet.java
++++ src/java/com/mchange/v2/c3p0/impl/SnatchFromSetResultSet.java
+@@ -24,6 +24,8 @@
+ package com.mchange.v2.c3p0.impl;
+
+ import java.sql.*;
++import java.io.InputStream;
++import java.io.Reader;
+ import java.util.Set;
+ import com.mchange.v2.sql.filter.FilterResultSet;
+
+@@ -38,6 +40,27 @@
+ {
+ this.inner = inner;
+ activeResultSets.add( inner );
++ }
++
++ public boolean isWrapperFor( Class c )
++ {
++ return c.isInstance(this) || c.isInstance(this.inner) || c.isInstance(this.activeResultSets);
++ }
++
++ public Object unwrap( Class c )
++ {
++ if (c.isInstance(this)) {
++ return this;
++ }
++ else if (c.isInstance(this.inner)) {
++ return this.inner;
++ }
++ else if (c.isInstance(this.activeResultSets)) {
++ return this.activeResultSets;
++ }
++
++ // should people be calling unwrap when isWrapperFor would return false?
++ return null;
+ }
+
+ public synchronized void close() throws SQLException
+@@ -46,4 +69,245 @@
+ activeResultSets.remove( inner );
+ inner = null;
+ }
++
++ public boolean isClosed()
++ {
++ return (inner == null);
++ }
++
++ public void updateNClob( String column, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( String s, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( String s, NClob nc ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNClob( int i, NClob nc ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateClob( String s, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateClob( String s, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateClob( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateClob( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBlob( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBlob( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBlob( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBlob( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateCharacterStream( String s, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateCharacterStream( String s, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateCharacterStream( int i, Reader reader ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateCharacterStream( int i, Reader reader, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBinaryStream( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBinaryStream( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBinaryStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateBinaryStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateAsciiStream( String s, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateAsciiStream( String s, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateAsciiStream( int i, InputStream inp ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateAsciiStream( int i, InputStream inp, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNCharacterStream( String s, Reader r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNCharacterStream( String s, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNCharacterStream( int i, Reader r ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNCharacterStream( int i, Reader r, long l ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateSQLXML( String s, SQLXML sx ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateSQLXML( int i, SQLXML sx ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNString( String label, String value ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateNString( int i, String value ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateRowId( String s, RowId x ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public void updateRowId( int i, RowId x ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Reader getNCharacterStream( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Reader getNCharacterStream( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public String getNString( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public String getNString( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public SQLXML getSQLXML( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public SQLXML getSQLXML( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public NClob getNClob( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public NClob getNClob( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public RowId getRowId( String s ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public RowId getRowId( int i ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ // stub methods - required by java.sql.ResultSet since 1.6
++ public int getHoldability()
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
+ }
+diff --git src/java/com/mchange/v2/c3p0/test/FreezableDriverManagerDataSource.java src/java/com/mchange/v2/c3p0/test/FreezableDriverManagerDataSource.java
+index f386fc9..7b7a509 100644
+--- src/java/com/mchange/v2/c3p0/test/FreezableDriverManagerDataSource.java
++++ src/java/com/mchange/v2/c3p0/test/FreezableDriverManagerDataSource.java
+@@ -280,4 +280,24 @@
+ throw new IOException("Unsupported Serialized Version: " + version);
+ }
+ }
++
++ public boolean isWrapperFor( Class iface ) throws SQLException
++ {
++ return iface.isInstance(this) || iface.isInstance(driver());
++ }
++
++ public Object unwrap( Class iface ) throws SQLException
++ {
++ if (this.isWrapperFor(iface)) {
++ if (iface.isInstance(this)) {
++ return this;
++ }
++ else {
++ return driver();
++ }
++ }
++ else {
++ throw new SQLException("no object found");
++ }
++ }
+ }
+diff --git src/java/com/mchange/v2/c3p0/util/CloseReportingConnectionWrapper.java src/java/com/mchange/v2/c3p0/util/CloseReportingConnectionWrapper.java
+index 5d72eb1..f725ffe 100644
+--- src/java/com/mchange/v2/c3p0/util/CloseReportingConnectionWrapper.java
++++ src/java/com/mchange/v2/c3p0/util/CloseReportingConnectionWrapper.java
+@@ -24,6 +24,7 @@
+ package com.mchange.v2.c3p0.util;
+
+ import java.sql.*;
++import java.util.Properties;
+ import com.mchange.v2.sql.filter.*;
+
+ public class CloseReportingConnectionWrapper extends FilterConnection
+@@ -37,4 +38,73 @@
+ new SQLWarning("Connection.close() called!").printStackTrace();
+ super.close();
+ }
++
++ public Struct createStruct( String typename, Object[] attrs ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Array createArrayOf( String typename, Object[] elements ) throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public SQLXML createSQLXML() throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public NClob createNClob() throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Blob createBlob() throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public Clob createClob() throws SQLFeatureNotSupportedException
++ {
++ throw new SQLFeatureNotSupportedException();
++ }
++
++ public boolean isWrapperFor( Class c )
++ {
++ return c.isInstance(this);
++ }
++
++ public Object unwrap( Class c )
++ {
++ if (this.isWrapperFor(c)) {
++ return this;
++ }
++ return null;
++ }
++
++ // stub methods required by java.sql.Connection since 1.6
++ public Properties getClientInfo()
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++
++ public String getClientInfo( String name )
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++
++ public void setClientInfo( Properties p )
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++
++ public void setClientInfo( String name, String value )
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
++
++ public boolean isValid( int timeout )
++ {
++ throw new RuntimeException(new NoSuchMethodException("stub method"));
++ }
+ }
diff --git a/c3p0.pom b/c3p0.pom
new file mode 100644
index 0000000..8abdf43
--- /dev/null
+++ b/c3p0.pom
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>c3p0</groupId>
+ <artifactId>c3p0</artifactId>
+ <version>0.9.2-pre1</version>
+ <packaging>jar</packaging>
+ <name>c3p0:JDBC DataSources/Resource Pools</name>
+ <description>
+ c3p0 is an easy-to-use library for augmenting traditional (DriverManager-based) JDBC drivers with JNDI-bindable DataSources,
+ including DataSources that implement Connection and Statement Pooling, as described by the jdbc3 spec and jdbc2 std extension.
+ </description>
+ <url>http://c3p0.sourceforge.net</url>
+ <scm>
+ <url>http://c3p0.cvs.sourceforge.net/c3p0</url>
+ </scm>
+ <licenses>
+ <license>
+ <name>GNU LESSER GENERAL PUBLIC LICENSE</name>
+ <url>http://www.gnu.org/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <dependencies/>
+</project>
diff --git a/c3p0.spec b/c3p0.spec
new file mode 100644
index 0000000..2d203e1
--- /dev/null
+++ b/c3p0.spec
@@ -0,0 +1,110 @@
+%global prerel pre1
+
+Name: c3p0
+Version: 0.9.2
+Release: 0.5.%{prerel}%{?dist}
+Summary: JDBC DataSources/Resource Pools
+License: LGPLv2
+URL: http://sourceforge.net/projects/c3p0
+Group: Development/Libraries
+
+BuildRequires: java-devel >= 1:1.6.0
+BuildRequires: java-javadoc >= 1:1.6.0
+BuildRequires: jpackage-utils
+BuildRequires: ant
+BuildRequires: mchange-commons
+
+Requires: java
+Requires: mchange-commons
+Requires: jpackage-utils
+
+Source0: http://download.sourceforge.net/c3p0/%{name}-%{version}-%{prerel}.src.tgz
+
+# POM based on the one found at http://mvnrepository.com/artifact/c3p0/c3p0
+Source1: c3p0.pom
+
+# Patch to build on java 1.6
+Patch0: %{name}-build-on-1.6.patch
+
+BuildArch: noarch
+
+%description
+c3p0 is an easy-to-use library for augmenting traditional JDBC drivers with
+JNDI-bindable DataSources, including DataSources that implement Connection
+and Statement Pooling, as described by the jdbc3 spec and jdbc2 standard
+extension.
+
+%package javadoc
+Summary: API documentation for %{name}
+Group: Documentation
+Requires: jpackage-utils
+Requires: java-javadoc
+
+%description javadoc
+%{summary}.
+
+%prep
+%setup -q -n %{name}-%{version}-%{prerel}.src
+
+%patch0 -p0 -b .orig
+
+# remove all binary bits
+find -name '*.class' -exec rm -f '{}' \;
+find -name '*.jar' -exec rm -f '{}' \;
+
+# remove manifest classpath
+sed -i.bak -e "s/<attribute\ name=\"Class-Path\"\ value=\"\${mchange-commons\.jar\.file\.name}\"\ \/>//" build.xml
+
+%build
+ant \
+ -Dbuild.sysclasspath=first \
+ -Dmchange-commons.jar.file.dir=/usr/share/java \
+ -Dmchange-commons.jar.file.name=mchange-commons.jar \
+ jar javadocs
+
+%install
+# jar
+install -pD -T build/%{name}-%{version}-%{prerel}.jar \
+ %{buildroot}%{_javadir}/%{name}.jar
+
+# javadocs
+install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+
+# pom
+install -pD -m 644 -T %{SOURCE1} \
+ %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
+%files
+%doc src/dist-static/CHANGELOG
+%doc src/dist-static/LICENSE
+%doc src/dist-static/RELEASE*
+%doc src/doc/index.html
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%{_javadir}/%{name}.jar
+
+%files javadoc
+%doc src/dist-static/LICENSE
+%{_javadocdir}/%{name}
+
+%changelog
+* Thu Jul 28 2011 Mat Booth <fedora at matbooth.co.uk> 0.9.2-0.5.pre1
+- Update for latest guidelines.
+
+* Sat Jun 11 2011 Mat Booth <fedora at matbooth.co.uk> 0.9.2-0.4.pre1
+- Drop redundant clean steps.
+- Req(post/postun) jpackage-utils
+
+* Mon Apr 25 2011 Mat Booth <fedora at matbooth.co.uk> 0.9.2-0.3.pre1
+- Add a POM and Maven depmap.
+
+* Thu Feb 3 2011 Mat Booth <fedora at matbooth.co.uk> 0.9.2-0.2.pre1
+- Patch to build with Java 1.6 (thanks to mcrawford for contributing a chunk
+ of this.)
+- Other guideline mis-compliances fixed.
+
+* Fri Oct 8 2010 Tom "spot" Callaway <tcallawa at redhat.com> 0.9.2-0.1.pre1
+- initial package
diff --git a/sources b/sources
index e69de29..2966552 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+396ccb35b2b4450ec1339511990fb383 c3p0-0.9.2-pre1.src.tgz
More information about the scm-commits
mailing list