From 5d0d4ca4cdf03b9f4cda75569bb55605d3a9b804dcf1d3816c6efedf58d1210d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 29 Sep 2016 11:27:49 +0000 Subject: [PATCH] Accepting request 431236 from Java:packages package rename OBS-URL: https://build.opensuse.org/request/show/431236 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-dbcp?expand=0&rev=1 --- .gitattributes | 23 + .gitignore | 1 + commons-build.tar.bz2 | 3 + commons-dbcp-1.2.2-project_xml.patch | 27 + commons-dbcp-1.2.2-src.tar.bz2 | 3 + commons-dbcp-1.2.2.pom | 275 ++++ dbcp-1.2.2-jpp-depmap.xml | 192 +++ jakarta-commons-dbcp-src.changes | 17 + jakarta-commons-dbcp-src.spec | 76 + jakarta-commons-dbcp-target15.patch | 27 + jakarta-commons-dbcp.changes | 136 ++ jakarta-commons-dbcp.spec | 170 +++ java6-compatibility.patch | 1921 ++++++++++++++++++++++++++ jdbc41.patch | 610 ++++++++ pom-maven2jpp-depcat.xsl | 109 ++ pom-maven2jpp-mapdeps.xsl | 78 ++ pom-maven2jpp-newdepmap.xsl | 23 + 17 files changed, 3691 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 commons-build.tar.bz2 create mode 100644 commons-dbcp-1.2.2-project_xml.patch create mode 100644 commons-dbcp-1.2.2-src.tar.bz2 create mode 100644 commons-dbcp-1.2.2.pom create mode 100644 dbcp-1.2.2-jpp-depmap.xml create mode 100644 jakarta-commons-dbcp-src.changes create mode 100644 jakarta-commons-dbcp-src.spec create mode 100644 jakarta-commons-dbcp-target15.patch create mode 100644 jakarta-commons-dbcp.changes create mode 100644 jakarta-commons-dbcp.spec create mode 100644 java6-compatibility.patch create mode 100644 jdbc41.patch create mode 100644 pom-maven2jpp-depcat.xsl create mode 100644 pom-maven2jpp-mapdeps.xsl create mode 100644 pom-maven2jpp-newdepmap.xsl diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/commons-build.tar.bz2 b/commons-build.tar.bz2 new file mode 100644 index 0000000..d8ebf5f --- /dev/null +++ b/commons-build.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cca660848595ef4d1bf21943eb6a7dc52f7dcbe476f1dee79b83f5085005b7b2 +size 98979 diff --git a/commons-dbcp-1.2.2-project_xml.patch b/commons-dbcp-1.2.2-project_xml.patch new file mode 100644 index 0000000..dd338b7 --- /dev/null +++ b/commons-dbcp-1.2.2-project_xml.patch @@ -0,0 +1,27 @@ +--- project.xml.sav 2007-08-28 16:19:16.000000000 +0200 ++++ project.xml 2007-08-28 16:20:45.000000000 +0200 +@@ -193,6 +193,24 @@ + + + ++ ++ xerces ++ xercesImpl ++ 2.8.0 ++ ++ test ++ ++ ++ ++ ++ xerces ++ xml-apis ++ 1.3.03 ++ ++ test ++ ++ ++ + + + tomcat diff --git a/commons-dbcp-1.2.2-src.tar.bz2 b/commons-dbcp-1.2.2-src.tar.bz2 new file mode 100644 index 0000000..8325a0c --- /dev/null +++ b/commons-dbcp-1.2.2-src.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a6b35d1f8c25c5fbbc335d0cf81595ede4dd372adc2fb9ace994e996d63b2b5 +size 608127 diff --git a/commons-dbcp-1.2.2.pom b/commons-dbcp-1.2.2.pom new file mode 100644 index 0000000..6c7dccf --- /dev/null +++ b/commons-dbcp-1.2.2.pom @@ -0,0 +1,275 @@ + + 4.0.0 + commons-dbcp + commons-dbcp + Commons DBCP + 1.2.2 + Commons Database Connection Pooling + http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/ + + http://issues.apache.org/jira/ + + + + + +
commons-dev@jakarta.apache.org
+
+
+
+
+ 2001 + + + Commons Dev List + commons-dev-subscribe@jakarta.apache.org + commons-dev-unsubscribe@jakarta.apache.org + http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/ + + + Commons User List + commons-user-subscribe@jakarta.apache.org + commons-user-unsubscribe@jakarta.apache.org + http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/ + + + + + morgand + Morgan Delagrange + + + + + geirm + Geir Magnusson + + + + + craigmcc + Craig McClanahan + + + + + jmcnally + John McNally + + + + + mpoeschl + Martin Poeschl + mpoeschl@marmot.at + tucana.at + + + rwaldhoff + Rodney Waldhoff + + + + + dweinr1 + David Weinrich + + + + + dirkv + Dirk Verbeeck + + + + + yoavs + Yoav Shapira + yoavs@apache.org + Apache Software Foundation + + + psteitz + Phil Steitz + + + + + joehni + J?rg Schaible + joerg.schaible@gmx.de + + +1 + + + + + Todd Carmichael + toddc@concur.com + + + Wayne Woodfield + + + + + The Apache Software License, Version 2.0 + /LICENSE.txt + + + + scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk + http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk + + + The Apache Software Foundation + http://jakarta.apache.org + + + src/java + src/test + + + ${basedir}/src/test + + testpool.jocl + + + + META-INF + ${basedir} + + NOTICE.txt + + + + + + ${basedir}/src/test + + testpool.jocl + + + + + + maven-surefire-plugin + + + org/apache/commons/dbcp/TestAbandonedObjectPool.java + org/apache/commons/jocl/TestJOCLContentHandler.java + org/apache/commons/dbcp/TestDelegatingConnection.java + org/apache/commons/dbcp/TestPoolableConnection.java + org/apache/commons/dbcp/TestDelegatingPreparedStatement.java + org/apache/commons/dbcp/TestDelegatingStatement.java + org/apache/commons/dbcp/TestJOCLed.java + org/apache/commons/dbcp/TestManual.java + org/apache/commons/dbcp/TestBasicDataSourceFactory.java + org/apache/commons/dbcp/TestBasicDataSource.java + org/apache/commons/dbcp/TestAbandonedBasicDataSource.java + org/apache/commons/dbcp/TestPStmtPoolingBasicDataSource.java + org/apache/commons/dbcp/TestPoolingDataSource.java + org/apache/commons/dbcp/TestJndi.java + org/apache/commons/dbcp/datasources/TestFactory.java + org/apache/commons/dbcp/datasources/TestPerUserPoolDataSource.java + org/apache/commons/dbcp/datasources/TestSharedPoolDataSource.java + + + + + maven-artifact-plugin + 1.5 + + test + <strong>Build Only</strong> Generates distributions. + + + + maven-xdoc-plugin + 1.9.2 + + <strong>Site Only</strong> - v1.9.2 (minimum) + required for building the project web site. + + + + maven-plugins + maven-cobertura-plugin + 1.1.1 + + test + <strong>Site Only</strong> Generates test coverage reports. + + + + maven-plugins + maven-findbugs-plugin + 1.3 + + test + <strong>Site Only</strong> + + + + maven-pmd-plugin + 1.9 + + test + <strong>Site Only</strong> + + + + maven-checkstyle-plugin + 3.0.1 + + test + <strong>Site Only</strong> + + + + + + + commons-pool + commons-pool + 1.3 + + + junit + junit + 3.8.1 + test + + + tomcat + naming-common + 5.0.28 + test + + + tomcat + naming-java + 5.0.28 + test + + + commons-logging + commons-logging + 1.0.4 + test + + + + + default + Default Repository + file:///www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}/ + + + default + Default Site + scp://people.apache.org//www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}/ + + converted + +
\ No newline at end of file diff --git a/dbcp-1.2.2-jpp-depmap.xml b/dbcp-1.2.2-jpp-depmap.xml new file mode 100644 index 0000000..d8bdac9 --- /dev/null +++ b/dbcp-1.2.2-jpp-depmap.xml @@ -0,0 +1,192 @@ + + + + + commons-logging + commons-logging + 1.0.4 + http://jakarta.apache.org/commons/logging + + + JPP + commons-logging + commons-logging.jar + 1.0.4 + http://jakarta.apache.org/commons/logging + + + + + commons-pool + commons-pool + 1.3 + + + JPP + commons-pool + commons-pool.jar + 1.3 + + + + + junit + junit + 3.8.1 + + + JPP + junit + junit.jar + 3.8.1 + + + + + xerces + xercesImpl + 2.8.0 + + + JPP + xercesImpl + xerces-j2.jar + 2.9.0 + + + + + xerces + xml-apis + 1.3.03 + + + JPP + xml-apis + xml-commons-jaxp-1.3-apis.jar + 1.3.03 + + + + + maven + maven-artifact-plugin + 1.5 + http://www.ibiblio.org/maven/maven/plugins/ + plugin + + + JPP + maven-artifact-plugin + maven-artifact-plugin.jar + 1.5 + http://www.ibiblio.org/maven/maven/plugins/ + plugin + + + + + maven + maven-checkstyle-plugin + 3.0.1 + plugin + + + JPP + maven-checkstyle-plugin + maven-checkstyle-plugin.jar + 3.0.1 + plugin + + + + + maven-plugins + maven-cobertura-plugin + 1.1.1 + http://maven-plugins.sourceforge.net/maven-cobertura-plugin/ + plugin + + + JPP + maven-cobertura-plugin + maven-cobertura-plugin.jar + 1.1.1 + http://maven-plugins.sourceforge.net/maven-cobertura-plugin/ + plugin + + + + + maven-plugins + maven-findbugs-plugin + 1.3 + plugin + + + JPP + maven-findbugs-plugin + maven-findbugs-plugin.jar + 1.3 + plugin + + + + + maven + maven-pmd-plugin + 1.9 + plugin + + + JPP + maven-pmd-plugin + maven-pmd-plugin.jar + 1.9 + plugin + + + + + maven + maven-xdoc-plugin + 1.9.2 + http://maven.apache.org/reference/plugins/xdoc/ + plugin + + + JPP + maven-xdoc-plugin + maven-xdoc-plugin.jar + 1.9.2 + http://maven.apache.org/reference/plugins/xdoc/ + plugin + + + + + tomcat + naming-common + 5.0.28 + + + JPP + naming-common + tomcat5/naming-resources.jar + 5.0.28 + + + + + tomcat + naming-java + 5.0.28 + + + JPP + naming-java + tomcat5/naming-factory.jar + 5.0.28 + + + diff --git a/jakarta-commons-dbcp-src.changes b/jakarta-commons-dbcp-src.changes new file mode 100644 index 0000000..f7c28a7 --- /dev/null +++ b/jakarta-commons-dbcp-src.changes @@ -0,0 +1,17 @@ +------------------------------------------------------------------- +Fri Jul 11 09:26:24 UTC 2014 - tchvatal@suse.com + +- Cleanup with spec-cleaner + +------------------------------------------------------------------- +Thu Apr 3 12:40:39 UTC 2014 - darin@darins.net + +- Add BuildRoot for SLES builds +- Disable post-build-check on SLES due to FHS errors + +------------------------------------------------------------------- +Tue Nov 26 14:12:42 UTC 2013 - mvyskocil@suse.com + +- Drop -src package into separate spec file in order to really + break a build cycle between tomcat and dbcp + diff --git a/jakarta-commons-dbcp-src.spec b/jakarta-commons-dbcp-src.spec new file mode 100644 index 0000000..67dc720 --- /dev/null +++ b/jakarta-commons-dbcp-src.spec @@ -0,0 +1,76 @@ +# +# spec file for package jakarta-commons-dbcp-src +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define base_name dbcp +%define short_name commons-%{base_name} +Name: jakarta-commons-dbcp-src +Version: 1.2.2 +Release: 0 +Summary: Jakarta Commons DataBase Pooling Package src +License: Apache-2.0 +Group: Development/Libraries/Java +Url: http://jakarta.apache.org/commons/dbcp/ +Source0: commons-dbcp-1.2.2-src.tar.bz2 +Source5: commons-build.tar.bz2 +Patch0: commons-dbcp-1.2.2-project_xml.patch +#improved from https://issues.apache.org/jira/browse/DBCP-191 +Patch1: java6-compatibility.patch +Patch2: jakarta-commons-dbcp-target15.patch +#http://pkgs.fedoraproject.org/gitweb/?p=apache-commons-dbcp.git;a=blob_plain;f=jdbc41.patch;hb=HEAD +Patch3: jdbc41.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch + +%description +The DBCP package creates and maintains a database connection pool +package written in the Java language to be distributed under the ASF +license. The package is available as a pseudo-JDBC driver and via a +DataSource interface. The package also supports multiple logins to +multiple database systems, reclamation of stale or dead connections, +testing for valid connections, PreparedStatement pooling, and other +features. + +This package contains a source code, which is intended to break some +bootstrap issues between commons-dbcp and tomcat. + +%prep +%setup -q -n %{short_name}-%{version}-src +# quick hack +cp LICENSE.txt ../LICENSE +# remove all binary libs +find . -name "*.jar" -exec rm -f {} \; +bzip2 -dc %{SOURCE5} | tar xf - +%patch0 -b .sav +%patch1 -b .sav1 +%patch2 -b .target15 +%patch3 + +%build +# nope + +%install +# source code +install -d -m 0755 %{buildroot}%{_usrsrc}/%{short_name}/ +cp -pr src/java %{buildroot}%{_usrsrc}/%{short_name}/ + +%files +%defattr(0644,root,root,0755) +%doc LICENSE.txt +%{_usrsrc}/%{short_name} + +%changelog diff --git a/jakarta-commons-dbcp-target15.patch b/jakarta-commons-dbcp-target15.patch new file mode 100644 index 0000000..b6a2ec0 --- /dev/null +++ b/jakarta-commons-dbcp-target15.patch @@ -0,0 +1,27 @@ +--- build.xml ++++ build.xml +@@ -142,7 +142,7 @@ + + + +- + +- + +- +\ No newline at end of file ++ diff --git a/jakarta-commons-dbcp.changes b/jakarta-commons-dbcp.changes new file mode 100644 index 0000000..60f688a --- /dev/null +++ b/jakarta-commons-dbcp.changes @@ -0,0 +1,136 @@ +------------------------------------------------------------------- +Wed Mar 18 09:47:57 UTC 2015 - tchvatal@suse.com + +- Fix build with new javapackages-tools + +------------------------------------------------------------------- +Tue Sep 23 13:00:11 UTC 2014 - tchvatal@suse.com + +- Do not require tomcat, it is just test dependency causing cycle + bnc#954603 + +------------------------------------------------------------------- +Mon Jul 28 06:57:43 UTC 2014 - tchvatal@suse.com + +- Update the alternatives once more to match docu. + +------------------------------------------------------------------- +Mon Jul 21 08:19:33 UTC 2014 - tchvatal@suse.com + +- Fixup the update-alternatives code. +- Get rid of the old maven code that we didn't use + +------------------------------------------------------------------- +Fri Jul 11 09:26:14 UTC 2014 - tchvatal@suse.com + +- Cleanup with spec-cleaner + +------------------------------------------------------------------- +Tue Nov 26 14:56:21 UTC 2013 - mvyskocil@suse.com + +- Move -src subpackage to extra spec file + +------------------------------------------------------------------- +Wed Oct 30 14:54:34 UTC 2013 - mvyskocil@suse.com + +- Create -src subpackage in order to create tomcat-dbcp.jar without + build cycles (bnc#847505) + +------------------------------------------------------------------- +Mon Sep 9 11:05:46 UTC 2013 - tchvatal@suse.com + +- Move from jpackage-utils to javapackage-tools + +------------------------------------------------------------------- +Thu Sep 5 12:50:42 UTC 2013 - mvyskocil@suse.com + +- don't require commons-collections-tomcat5 for build +- drop -tomcat5 subpackage +- use new add_maven_depmap macro +- drop source url as apache stops to distribute such old version + +------------------------------------------------------------------- +Wed Jun 20 12:13:42 UTC 2012 - mvyskocil@suse.cz + +- require tomcat-lib for build + +------------------------------------------------------------------- +Fri May 25 09:44:21 UTC 2012 - mvyskocil@suse.cz + +- fix build with jdk7 +- remove note needed obsolete +- rename tomcat5 subpackage to tomcat +- use non-versioned javadocdir + +------------------------------------------------------------------- +Thu Nov 6 15:12:18 CET 2008 - ro@suse.de + +- add buildignore for jakarta-commons-dbcp-tomcat5 + (workaround for bs bug) + +------------------------------------------------------------------- +Thu Aug 28 14:59:09 CEST 2008 - mvyskocil@suse.cz + +- target=1.5 source=1.5 + +------------------------------------------------------------------- +Thu Jul 31 13:10:45 CEST 2008 - mvyskocil@suse.cz + +- do not add a java6 compatibility for javac 1.5.0 (fixed build on ia64) + +------------------------------------------------------------------- +Tue Jul 29 09:03:46 CEST 2008 - anosek@suse.cz + +- made the symlink jakarta-commons-dbcp -> jakarta-commons-dbcp-1.2.2 + part of the javadoc package + +------------------------------------------------------------------- +Mon Jul 21 13:04:46 CEST 2008 - mvyskocil@suse.cz + +- merged with jpackage 1.7 spec + - added a tomcat5 subpackage (to fix [bnc#408253]) + - added a maven build branch (n/a in suse yet): + - added a poms and project.xmls for maven + - added a depmagfrags for maven +- build againts tomcat6 (instead of tomcat5 as in original jpackage project) +- add a java6 compatibility patch + + +------------------------------------------------------------------- +Wed Apr 9 09:46:10 CEST 2008 - mvyskocil@suse.cz + +- update to 1.2.2 +- remove the java14compat patch + +------------------------------------------------------------------- +Mon Sep 25 11:54:16 CEST 2006 - skh@suse.de + +- don't use icecream +- use source="1.4" and target="1.4" for build with java 1.5 + +------------------------------------------------------------------- +Wed Jan 25 21:46:36 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Wed Oct 12 16:18:22 CEST 2005 - jsmeix@suse.de + +- Removed jdbc-stdext from build-classpath because it is + not needed for build. + +------------------------------------------------------------------- +Wed Jul 27 16:28:45 CEST 2005 - jsmeix@suse.de + +- Adjustments in the spec file. + +------------------------------------------------------------------- +Mon Jul 18 16:08:49 CEST 2005 - jsmeix@suse.de + +- Current version 1.2.1 from JPackage.org + +------------------------------------------------------------------- +Fri Sep 3 12:12:56 CEST 2004 - skh@suse.de + +- Initial package created with version 1.2.1 (JPackage 1.5) + diff --git a/jakarta-commons-dbcp.spec b/jakarta-commons-dbcp.spec new file mode 100644 index 0000000..0698ce4 --- /dev/null +++ b/jakarta-commons-dbcp.spec @@ -0,0 +1,170 @@ +# +# spec file for package jakarta-commons-dbcp +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define base_name dbcp +%define short_name commons-%{base_name} +Name: jakarta-commons-dbcp +Version: 1.2.2 +Release: 0 +Summary: Jakarta Commons DataBase Pooling Package +License: Apache-2.0 +Group: Development/Libraries/Java +Url: http://jakarta.apache.org/commons/dbcp/ +Source0: commons-dbcp-1.2.2-src.tar.bz2 +Source1: pom-maven2jpp-depcat.xsl +Source2: pom-maven2jpp-newdepmap.xsl +Source3: pom-maven2jpp-mapdeps.xsl +Source4: %{base_name}-%{version}-jpp-depmap.xml +Source5: commons-build.tar.bz2 +Source7: commons-dbcp-1.2.2.pom +Patch0: commons-dbcp-1.2.2-project_xml.patch +#improved from https://issues.apache.org/jira/browse/DBCP-191 +Patch1: java6-compatibility.patch +Patch2: jakarta-commons-dbcp-target15.patch +#http://pkgs.fedoraproject.org/gitweb/?p=apache-commons-dbcp.git;a=blob_plain;f=jdbc41.patch;hb=HEAD +Patch3: jdbc41.patch +BuildRequires: ant >= 1.6.5 +BuildRequires: jakarta-commons-logging +BuildRequires: jakarta-commons-pool >= 1.3 +BuildRequires: java-devel +BuildRequires: javapackages-tools +BuildRequires: jdbc-stdext >= 2.0 +BuildRequires: junit >= 3.8.1 +BuildRequires: xerces-j2 +Requires: commons-collections >= 3.2 +Requires: commons-pool >= 1.3 +Requires(post): %{_sbindir}/update-alternatives +Requires(post): javapackages-tools +Requires(postun): javapackages-tools +Requires(preun): %{_sbindir}/update-alternatives +Provides: %{short_name} = %{version}-%{release} +Provides: hibernate_jdbc_cache +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +#!BuildIgnore: jakarta-commons-dbcp-tomcat5 +#!BuildIgnore: jakarta-commons-dbcp-tomcat + +%description +The DBCP package creates and maintains a database connection pool +package written in the Java language to be distributed under the ASF +license. The package is available as a pseudo-JDBC driver and via a +DataSource interface. The package also supports multiple logins to +multiple database systems, reclamation of stale or dead connections, +testing for valid connections, PreparedStatement pooling, and other +features. + +%package javadoc +Summary: Javadoc for jakarta-commons-dbcp +Group: Development/Libraries/Java + +%description javadoc +This package contains the javadoc documentation for the DBCP package. + +The DBCP package shall create and maintain a database connection pool +package written in the Java language to be distributed under the ASF +license. The package shall be available as a pseudo-JDBC driver and via +a DataSource interface. The package shall also support multiple logins +to multiple database systems, reclamation of stale or dead connections, +testing for valid connections, PreparedStatement pooling, and other +features. + +%prep +%setup -q -n %{short_name}-%{version}-src +# quick hack +cp LICENSE.txt ../LICENSE +# remove all binary libs +find . -name "*.jar" -exec rm -f {} \; +bzip2 -dc %{SOURCE5} | tar xf - +%patch0 -b .sav +%patch1 -b .sav1 +%patch2 -b .target15 +%patch3 + +%build +if [ ! -f %{SOURCE4} ]; then + export DEPCAT=$(pwd)/%{base_name}-%{version}-depcat.new.xml + echo '' > $DEPCAT + echo '' >> $DEPCAT + for p in $(find . -name project.xml); do + pushd $(dirname $p) + %{_bindir}/saxon project.xml %{SOURCE1} >> $DEPCAT + popd + done + echo >> $DEPCAT + echo '' >> $DEPCAT + %{_bindir}/saxon $DEPCAT %{SOURCE2} > %{base_name}-%{version}-depmap.new.xml +fi + +ant \ + -Dcommons-pool.jar=$(build-classpath commons-pool) \ + -Djdbc20ext.jar=$(build-classpath jdbc-stdext) \ + -Djunit.jar=$(build-classpath junit) \ + -Dxerces.jar=$(build-classpath xerces-j2) \ + -Dxml-apis.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \ + -Dnaming-common.jar=$(build-classpath tomcat/catalina) \ + -Dnaming-java.jar=$(build-classpath tomcat/catalina) \ + -Dlogging.jar=$(build-classpath commons-logging) \ + -Djava.io.tmpdir=. \ + dist + +%install +# jars +install -d -m 755 %{buildroot}%{_javadir} +install -m 644 dist/%{short_name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar +(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done) +(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +# pom +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 %{SOURCE7} \ + %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -pr dist/docs/* %{buildroot}%{_javadocdir}/%{name} +# quick hack clean up +rm ../LICENSE +# hibernate_jdbc_cache ghost symlink +mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ +ln -sf %{_sysconfdir}/alternatives/hibernate_jdbc_cache.jar %{buildroot}%{_javadir}/hibernate_jdbc_cache.jar + +%post +update-alternatives --install %{_javadir}/hibernate_jdbc_cache.jar \ + hibernate_jdbc_cache %{_javadir}/%{name}.jar 60 + +%preun +if [ $1 -eq 0 ] ; then + update-alternatives --remove hibernate_jdbc_cache %{_javadir}/%{name}.jar +fi + +%files +%defattr(-,root,root) +%doc LICENSE.txt +%{_javadir}/%{name}.jar +%{_javadir}/%{name}-%{version}.jar +%{_javadir}/%{short_name}.jar +%{_javadir}/%{short_name}-%{version}.jar +%{_javadir}/hibernate_jdbc_cache.jar +%ghost %{_sysconfdir}/alternatives/hibernate_jdbc_cache.jar +%{_mavenpomdir}/* +%{_datadir}/maven-metadata/%{name}.xml + +%files javadoc +%defattr(-,root,root) +%doc %{_javadocdir}/%{name} + +%changelog diff --git a/java6-compatibility.patch b/java6-compatibility.patch new file mode 100644 index 0000000..0446762 --- /dev/null +++ b/java6-compatibility.patch @@ -0,0 +1,1921 @@ +Index: src/test/org/apache/commons/dbcp/TesterPreparedStatement.java +================================================================================ +--- build.xml ++++ build.xml +@@ -70,7 +70,7 @@ + + + +- ++ + + + +--- src/java/org/apache/commons/dbcp/BasicDataSource.java ++++ src/java/org/apache/commons/dbcp/BasicDataSource.java +@@ -1100,6 +1100,13 @@ + } + } + ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ return false; ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ throw new SQLException("BasicDataSource is not a wrapper."); ++ } + + // ------------------------------------------------------ Protected Methods + +--- src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java ++++ src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java +@@ -32,6 +32,11 @@ + import java.io.InputStream; + import java.io.Reader; + import java.sql.SQLException; ++/* JDBC_4_ANT_KEY_BEGIN */ ++import java.sql.NClob; ++import java.sql.RowId; ++import java.sql.SQLXML; ++/* JDBC_4_ANT_KEY_END */ + + /** + * A base delegating implementation of {@link CallableStatement}. +@@ -332,6 +337,337 @@ + + public URL getURL(String parameterName) throws SQLException + { checkOpen(); try { return _stmt.getURL(parameterName); } catch (SQLException e) { handleException(e); return null; } } +- + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public RowId getRowId(int parameterIndex) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getRowId(parameterIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public RowId getRowId(String parameterName) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getRowId(parameterName); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public void setRowId(String parameterName, RowId value) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setRowId(parameterName, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNString(String parameterName, String value) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNString(parameterName, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNCharacterStream(String parameterName, Reader reader, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNCharacterStream(parameterName, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNClob(String parameterName, NClob value) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNClob(parameterName, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setClob(String parameterName, Reader reader, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setClob(parameterName, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBlob(parameterName, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNClob(String parameterName, Reader reader, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNClob(parameterName, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public NClob getNClob(int parameterIndex) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getNClob(parameterIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public NClob getNClob(String parameterName) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getNClob(parameterName); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public void setSQLXML(String parameterName, SQLXML value) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setSQLXML(parameterName, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public SQLXML getSQLXML(int parameterIndex) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getSQLXML(parameterIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public SQLXML getSQLXML(String parameterName) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getSQLXML(parameterName); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public String getNString(int parameterIndex) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getNString(parameterIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public String getNString(String parameterName) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getNString(parameterName); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Reader getNCharacterStream(int parameterIndex) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getNCharacterStream(parameterIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Reader getNCharacterStream(String parameterName) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getNCharacterStream(parameterName); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Reader getCharacterStream(int parameterIndex) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getCharacterStream(parameterIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Reader getCharacterStream(String parameterName) throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.getCharacterStream(parameterName); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public void setBlob(String parameterName, Blob blob) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBlob(parameterName, blob); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setClob(String parameterName, Clob clob) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setClob(parameterName, clob); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setAsciiStream(String parameterName, InputStream inputStream, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setAsciiStream(parameterName, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setBinaryStream(String parameterName, InputStream inputStream, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBinaryStream(parameterName, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setCharacterStream(parameterName, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setAsciiStream(String parameterName, InputStream inputStream) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setAsciiStream(parameterName, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setBinaryStream(String parameterName, InputStream inputStream) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBinaryStream(parameterName, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setCharacterStream(String parameterName, Reader reader) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setCharacterStream(parameterName, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNCharacterStream(String parameterName, Reader reader) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNCharacterStream(parameterName, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setClob(String parameterName, Reader reader) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setClob(parameterName, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } } ++ ++ public void setBlob(String parameterName, InputStream inputStream) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBlob(parameterName, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } } ++ ++ public void setNClob(String parameterName, Reader reader) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNClob(parameterName, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/java/org/apache/commons/dbcp/DelegatingConnection.java ++++ src/java/org/apache/commons/dbcp/DelegatingConnection.java +@@ -26,6 +26,19 @@ + import java.sql.Statement; + import java.util.List; + import java.util.Map; ++/* JDBC_4_ANT_KEY_BEGIN */ ++import java.sql.Array; ++import java.sql.Blob; ++import java.sql.ClientInfoStatus; ++import java.sql.Clob; ++import java.sql.NClob; ++import java.sql.SQLClientInfoException; ++import java.sql.SQLXML; ++import java.sql.Struct; ++import java.util.Collections; ++import java.util.Map; ++import java.util.Properties; ++/* JDBC_4_ANT_KEY_END */ + + /** + * A base delegating implementation of {@link Connection}. +@@ -50,6 +63,10 @@ + */ + public class DelegatingConnection extends AbandonedTrace + implements Connection { ++/* JDBC_4_ANT_KEY_BEGIN */ ++ private static final Map EMPTY_FAILED_PROPERTIES = ++ Collections.emptyMap(); ++/* JDBC_4_ANT_KEY_END */ + /** My delegate {@link Connection}. */ + protected Connection _conn = null; + +@@ -488,4 +505,139 @@ + } + } + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ return _conn.isWrapperFor(iface); ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ return _conn.unwrap(iface); ++ } ++ ++ public Array createArrayOf(String typeName, Object[] elements) throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.createArrayOf(typeName, elements); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Blob createBlob() throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.createBlob(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Clob createClob() throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.createClob(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public NClob createNClob() throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.createNClob(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public SQLXML createSQLXML() throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.createSQLXML(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.createStruct(typeName, attributes); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public boolean isValid(int timeout) throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.isValid(timeout); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return false; ++ } ++ } ++ ++ public void setClientInfo(String name, String value) throws SQLClientInfoException { ++ try { ++ checkOpen(); ++ _conn.setClientInfo(name, value); ++ } ++ catch (SQLClientInfoException e) { ++ throw e; ++ } ++ catch (SQLException e) { ++ throw new SQLClientInfoException("Connection is closed.", EMPTY_FAILED_PROPERTIES, e); ++ } ++ } ++ ++ public void setClientInfo(Properties properties) throws SQLClientInfoException { ++ try { ++ checkOpen(); ++ _conn.setClientInfo(properties); ++ } ++ catch (SQLClientInfoException e) { ++ throw e; ++ } ++ catch (SQLException e) { ++ throw new SQLClientInfoException("Connection is closed.", EMPTY_FAILED_PROPERTIES, e); ++ } ++ } ++ ++ public Properties getClientInfo() throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.getClientInfo(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public String getClientInfo(String name) throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.getClientInfo(name); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java ++++ src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java +@@ -27,6 +27,13 @@ + import java.sql.ResultSetMetaData; + import java.sql.SQLException; + import java.util.Calendar; ++/* JDBC_4_ANT_KEY_BEGIN */ ++import java.io.InputStream; ++import java.io.Reader; ++import java.sql.NClob; ++import java.sql.RowId; ++import java.sql.SQLXML; ++/* JDBC_4_ANT_KEY_END */ + + /** + * A base delegating implementation of {@link PreparedStatement}. +@@ -221,6 +228,187 @@ + + public java.sql.ParameterMetaData getParameterMetaData() throws SQLException + { checkOpen(); try { return _stmt.getParameterMetaData(); } catch (SQLException e) { handleException(e); return null; } } +- + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public void setRowId(int parameterIndex, RowId value) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setRowId(parameterIndex, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNString(int parameterIndex, String value) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNString(parameterIndex, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNCharacterStream(parameterIndex, value, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNClob(int parameterIndex, NClob value) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNClob(parameterIndex, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setClob(parameterIndex, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBlob(parameterIndex, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNClob(parameterIndex, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setSQLXML(int parameterIndex, SQLXML value) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setSQLXML(parameterIndex, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setAsciiStream(int parameterIndex, InputStream inputStream, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setAsciiStream(parameterIndex, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setBinaryStream(int parameterIndex, InputStream inputStream, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBinaryStream(parameterIndex, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setCharacterStream(parameterIndex, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setAsciiStream(int parameterIndex, InputStream inputStream) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setAsciiStream(parameterIndex, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setBinaryStream(int parameterIndex, InputStream inputStream) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBinaryStream(parameterIndex, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setCharacterStream(parameterIndex, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNCharacterStream(int parameterIndex, Reader reader) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNCharacterStream(parameterIndex, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setClob(int parameterIndex, Reader reader) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setClob(parameterIndex, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setBlob(parameterIndex, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void setNClob(int parameterIndex, Reader reader) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setNClob(parameterIndex, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/java/org/apache/commons/dbcp/DelegatingResultSet.java ++++ src/java/org/apache/commons/dbcp/DelegatingResultSet.java +@@ -34,6 +34,11 @@ + import java.sql.Clob; + import java.sql.Array; + import java.util.Calendar; ++/* JDBC_4_ANT_KEY_BEGIN */ ++import java.sql.NClob; ++import java.sql.RowId; ++import java.sql.SQLXML; ++/* JDBC_4_ANT_KEY_END */ + + /** + * A base delegating implementation of {@link ResultSet}. +@@ -585,6 +590,459 @@ + + public void updateArray(String columnName, java.sql.Array x) throws SQLException + { try { _res.updateArray(columnName, x); } catch (SQLException e) { handleException(e); } } +- + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ return _res.isWrapperFor(iface); ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ return _res.unwrap(iface); ++ } ++ ++ public RowId getRowId(int columnIndex) throws SQLException { ++ try { ++ return _res.getRowId(columnIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public RowId getRowId(String columnLabel) throws SQLException { ++ try { ++ return _res.getRowId(columnLabel); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public void updateRowId(int columnIndex, RowId value) throws SQLException { ++ try { ++ _res.updateRowId(columnIndex, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateRowId(String columnLabel, RowId value) throws SQLException { ++ try { ++ _res.updateRowId(columnLabel, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public int getHoldability() throws SQLException { ++ try { ++ return _res.getHoldability(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return 0; ++ } ++ } ++ ++ public boolean isClosed() throws SQLException { ++ try { ++ return _res.isClosed(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return false; ++ } ++ } ++ ++ public void updateNString(int columnIndex, String value) throws SQLException { ++ try { ++ _res.updateNString(columnIndex, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNString(String columnLabel, String value) throws SQLException { ++ try { ++ _res.updateNString(columnLabel, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNClob(int columnIndex, NClob value) throws SQLException { ++ try { ++ _res.updateNClob(columnIndex, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNClob(String columnLabel, NClob value) throws SQLException { ++ try { ++ _res.updateNClob(columnLabel, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public NClob getNClob(int columnIndex) throws SQLException { ++ try { ++ return _res.getNClob(columnIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public NClob getNClob(String columnLabel) throws SQLException { ++ try { ++ return _res.getNClob(columnLabel); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public SQLXML getSQLXML(int columnIndex) throws SQLException { ++ try { ++ return _res.getSQLXML(columnIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public SQLXML getSQLXML(String columnLabel) throws SQLException { ++ try { ++ return _res.getSQLXML(columnLabel); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public void updateSQLXML(int columnIndex, SQLXML value) throws SQLException { ++ try { ++ _res.updateSQLXML(columnIndex, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateSQLXML(String columnLabel, SQLXML value) throws SQLException { ++ try { ++ _res.updateSQLXML(columnLabel, value); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public String getNString(int columnIndex) throws SQLException { ++ try { ++ return _res.getNString(columnIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public String getNString(String columnLabel) throws SQLException { ++ try { ++ return _res.getNString(columnLabel); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Reader getNCharacterStream(int columnIndex) throws SQLException { ++ try { ++ return _res.getNCharacterStream(columnIndex); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public Reader getNCharacterStream(String columnLabel) throws SQLException { ++ try { ++ return _res.getNCharacterStream(columnLabel); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return null; ++ } ++ } ++ ++ public void updateNCharacterStream(int columnIndex, Reader reader, long length) throws SQLException { ++ try { ++ _res.updateNCharacterStream(columnIndex, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { ++ try { ++ _res.updateNCharacterStream(columnLabel, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateAsciiStream(int columnIndex, InputStream inputStream, long length) throws SQLException { ++ try { ++ _res.updateAsciiStream(columnIndex, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateBinaryStream(int columnIndex, InputStream inputStream, long length) throws SQLException { ++ try { ++ _res.updateBinaryStream(columnIndex, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateCharacterStream(int columnIndex, Reader reader, long length) throws SQLException { ++ try { ++ _res.updateCharacterStream(columnIndex, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateAsciiStream(String columnLabel, InputStream inputStream, long length) throws SQLException { ++ try { ++ _res.updateAsciiStream(columnLabel, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateBinaryStream(String columnLabel, InputStream inputStream, long length) throws SQLException { ++ try { ++ _res.updateBinaryStream(columnLabel, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { ++ try { ++ _res.updateCharacterStream(columnLabel, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { ++ try { ++ _res.updateBlob(columnIndex, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { ++ try { ++ _res.updateBlob(columnLabel, inputStream, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { ++ try { ++ _res.updateClob(columnIndex, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { ++ try { ++ _res.updateClob(columnLabel, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { ++ try { ++ _res.updateNClob(columnIndex, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { ++ try { ++ _res.updateNClob(columnLabel, reader, length); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNCharacterStream(int columnIndex, Reader reader) throws SQLException { ++ try { ++ _res.updateNCharacterStream(columnIndex, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { ++ try { ++ _res.updateNCharacterStream(columnLabel, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateAsciiStream(int columnIndex, InputStream inputStream) throws SQLException { ++ try { ++ _res.updateAsciiStream(columnIndex, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateBinaryStream(int columnIndex, InputStream inputStream) throws SQLException { ++ try { ++ _res.updateBinaryStream(columnIndex, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateCharacterStream(int columnIndex, Reader reader) throws SQLException { ++ try { ++ _res.updateCharacterStream(columnIndex, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateAsciiStream(String columnLabel, InputStream inputStream) throws SQLException { ++ try { ++ _res.updateAsciiStream(columnLabel, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateBinaryStream(String columnLabel, InputStream inputStream) throws SQLException { ++ try { ++ _res.updateBinaryStream(columnLabel, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { ++ try { ++ _res.updateCharacterStream(columnLabel, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { ++ try { ++ _res.updateBlob(columnIndex, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { ++ try { ++ _res.updateBlob(columnLabel, inputStream); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateClob(int columnIndex, Reader reader) throws SQLException { ++ try { ++ _res.updateClob(columnIndex, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateClob(String columnLabel, Reader reader) throws SQLException { ++ try { ++ _res.updateClob(columnLabel, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNClob(int columnIndex, Reader reader) throws SQLException { ++ try { ++ _res.updateNClob(columnIndex, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public void updateNClob(String columnLabel, Reader reader) throws SQLException { ++ try { ++ _res.updateNClob(columnLabel, reader); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/java/org/apache/commons/dbcp/DelegatingStatement.java ++++ src/java/org/apache/commons/dbcp/DelegatingStatement.java +@@ -128,10 +128,6 @@ + + protected boolean _closed = false; + +- protected boolean isClosed() { +- return _closed; +- } +- + protected void checkOpen() throws SQLException { + if(isClosed()) { + throw new SQLException +@@ -339,4 +335,39 @@ + { checkOpen(); try { return _stmt.getResultSetHoldability(); } catch (SQLException e) { handleException(e); return 0; } } + + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ return _conn.isWrapperFor(iface); ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ return _conn.unwrap(iface); ++ } ++ ++ public boolean isClosed() throws SQLException { ++ return _closed; ++ } ++ ++ public void setPoolable(boolean poolable) throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.setPoolable(poolable); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ public boolean isPoolable() throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.isPoolable(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ return false; ++ } ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/java/org/apache/commons/dbcp/PoolingDataSource.java ++++ src/java/org/apache/commons/dbcp/PoolingDataSource.java +@@ -84,6 +84,14 @@ + public void setAccessToUnderlyingConnectionAllowed(boolean allow) { + this.accessToUnderlyingConnectionAllowed = allow; + } ++ ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ return false; ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ throw new SQLException("PoolingDataSource is not a wrapper."); ++ } + + //--- DataSource methods ----------------------------------------- + +--- src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java ++++ src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java +@@ -25,6 +25,19 @@ + import java.sql.Statement; + import java.sql.SQLWarning; + import java.sql.SQLException; ++/* JDBC_4_ANT_KEY_BEGIN */ ++import java.sql.Array; ++import java.sql.Blob; ++import java.sql.ClientInfoStatus; ++import java.sql.Clob; ++import java.sql.NClob; ++import java.sql.SQLClientInfoException; ++import java.sql.SQLXML; ++import java.sql.Struct; ++import java.util.Collections; ++import java.util.Map; ++import java.util.Properties; ++/* JDBC_4_ANT_KEY_END */ + + /** + * This class is the Connection that will be returned +@@ -42,6 +55,11 @@ + private static final String CLOSED + = "Attempted to use Connection after closed() was called."; + ++/* JDBC_4_ANT_KEY_BEGIN */ ++ private static final Map EMPTY_FAILED_PROPERTIES = ++ Collections.emptyMap(); ++/* JDBC_4_ANT_KEY_END */ ++ + /** The JDBC database connection. */ + private Connection connection; + +@@ -452,6 +470,86 @@ + assertOpen(); + return connection.prepareStatement(sql, columnNames); + } +- + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ return connection.isWrapperFor(iface); ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ return connection.unwrap(iface); ++ } ++ ++ public Array createArrayOf(String typeName, Object[] elements) throws SQLException { ++ assertOpen(); ++ return connection.createArrayOf(typeName, elements); ++ } ++ ++ public Blob createBlob() throws SQLException { ++ assertOpen(); ++ return connection.createBlob(); ++ } ++ ++ public Clob createClob() throws SQLException { ++ assertOpen(); ++ return connection.createClob(); ++ } ++ ++ public NClob createNClob() throws SQLException { ++ assertOpen(); ++ return connection.createNClob(); ++ } ++ ++ public SQLXML createSQLXML() throws SQLException { ++ assertOpen(); ++ return connection.createSQLXML(); ++ } ++ ++ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { ++ assertOpen(); ++ return connection.createStruct(typeName, attributes); ++ } ++ ++ public boolean isValid(int timeout) throws SQLException { ++ assertOpen(); ++ return connection.isValid(timeout); ++ } ++ ++ public void setClientInfo(String name, String value) throws SQLClientInfoException { ++ try { ++ assertOpen(); ++ connection.setClientInfo(name, value); ++ } ++ catch (SQLClientInfoException e) { ++ throw e; ++ } ++ catch (SQLException e) { ++ throw new SQLClientInfoException("Connection is closed.", EMPTY_FAILED_PROPERTIES, e); ++ } ++ } ++ ++ public void setClientInfo(Properties properties) throws SQLClientInfoException { ++ try { ++ assertOpen(); ++ connection.setClientInfo(properties); ++ } ++ catch (SQLClientInfoException e) { ++ throw e; ++ } ++ catch (SQLException e) { ++ throw new SQLClientInfoException("Connection is closed.", EMPTY_FAILED_PROPERTIES, e); ++ } ++ } ++ ++ public Properties getClientInfo() throws SQLException { ++ assertOpen(); ++ return connection.getClientInfo(); ++ } ++ ++ public String getClientInfo(String name) throws SQLException { ++ assertOpen(); ++ return connection.getClientInfo(name); ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/java/org/apache/commons/dbcp/cpdsadapter/PooledConnectionImpl.java ++++ src/java/org/apache/commons/dbcp/cpdsadapter/PooledConnectionImpl.java +@@ -26,6 +26,7 @@ + import javax.sql.ConnectionEvent; + import javax.sql.ConnectionEventListener; + import javax.sql.PooledConnection; ++import javax.sql.StatementEventListener; + + import org.apache.commons.dbcp.DelegatingConnection; + import org.apache.commons.dbcp.DelegatingPreparedStatement; +@@ -66,6 +67,11 @@ + private Vector eventListeners; + + /** ++ * StatementEventListeners ++ */ ++ private Vector statementEventListeners; ++ ++ /** + * flag set to true, once close() is called. + */ + boolean isClosed; +@@ -101,6 +107,12 @@ + } + } + ++ public void addStatementEventListener(StatementEventListener listener) { ++ if (!statementEventListeners.contains(listener)) { ++ statementEventListeners.add(listener); ++ } ++ } ++ + /** + * Closes the physical connection and marks this + * PooledConnection so that it may not be used +@@ -169,6 +181,10 @@ + eventListeners.remove(listener); + } + ++ public void removeStatementEventListener(StatementEventListener listener) { ++ statementEventListeners.remove(listener); ++ } ++ + /** + * Closes the physical connection and checks that the logical connection + * was closed as well. +--- src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java ++++ src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java +@@ -154,6 +154,14 @@ + */ + public abstract void close() throws Exception; + ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ return false; ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ throw new SQLException("InstanceKeyDataSource is not a wrapper."); ++ } ++ + // ------------------------------------------------------------------- + // Properties + +--- src/test/org/apache/commons/dbcp/TesterConnection.java ++++ src/test/org/apache/commons/dbcp/TesterConnection.java +@@ -25,6 +25,16 @@ + import java.sql.SQLWarning; + import java.sql.Statement; + import java.util.Map; ++/* JDBC_4_ANT_KEY_BEGIN */ ++import java.sql.Array; ++import java.sql.Blob; ++import java.sql.Clob; ++import java.sql.NClob; ++import java.sql.SQLClientInfoException; ++import java.sql.SQLXML; ++import java.sql.Struct; ++import java.util.Properties; ++/* JDBC_4_ANT_KEY_END */ + + /** + * A dummy {@link Connection}, for testing purposes. +@@ -274,6 +284,59 @@ + throws SQLException { + throw new SQLException("Not implemented."); + } +- + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public Array createArrayOf(String typeName, Object[] elements) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public Blob createBlob() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public Clob createClob() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public NClob createNClob() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public SQLXML createSQLXML() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public Struct createStruct(String typeName, Object[] attributes) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public boolean isValid(int timeout) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setClientInfo(String name, String value) throws SQLClientInfoException { ++ throw new SQLClientInfoException(); ++ } ++ ++ public void setClientInfo(Properties properties) throws SQLClientInfoException { ++ throw new SQLClientInfoException(); ++ } ++ ++ public Properties getClientInfo() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public String getClientInfo(String name) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/test/org/apache/commons/dbcp/TesterPreparedStatement.java ++++ src/test/org/apache/commons/dbcp/TesterPreparedStatement.java +@@ -28,6 +28,13 @@ + import java.sql.ResultSetMetaData; + import java.sql.SQLException; + import java.util.Calendar; ++/* JDBC_4_ANT_KEY_BEGIN */ ++import java.io.InputStream; ++import java.io.Reader; ++import java.sql.NClob; ++import java.sql.RowId; ++import java.sql.SQLXML; ++/* JDBC_4_ANT_KEY_END */ + + /** + * A dummy {@link PreparedStatement}, for testing purposes. +@@ -288,7 +295,79 @@ + public java.sql.ParameterMetaData getParameterMetaData() throws SQLException { + throw new SQLException("Not implemented."); + } +- + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public void setRowId(int parameterIndex, RowId value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setNString(int parameterIndex, String value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setNClob(int parameterIndex, NClob value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setSQLXML(int parameterIndex, SQLXML value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setAsciiStream(int parameterIndex, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setBinaryStream(int parameterIndex, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } + ++ public void setAsciiStream(int parameterIndex, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setBinaryStream(int parameterIndex, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setNCharacterStream(int parameterIndex, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setClob(int parameterIndex, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setNClob(int parameterIndex, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/test/org/apache/commons/dbcp/TesterResultSet.java ++++ src/test/org/apache/commons/dbcp/TesterResultSet.java +@@ -28,6 +28,13 @@ + import java.sql.SQLWarning; + import java.sql.Statement; + import java.util.Calendar; ++/* JDBC_4_ANT_KEY_BEGIN */ ++import java.io.InputStream; ++import java.io.Reader; ++import java.sql.NClob; ++import java.sql.RowId; ++import java.sql.SQLXML; ++/* JDBC_4_ANT_KEY_END */ + + /** + * A dummy {@link ResultSet}, for testing purposes. +@@ -757,7 +764,207 @@ + throws SQLException { + throw new SQLException("Not implemented."); + } +- + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ ++ ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public RowId getRowId(int columnIndex) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public RowId getRowId(String columnLabel) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateRowId(int columnIndex, RowId value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateRowId(String columnLabel, RowId value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public int getHoldability() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public boolean isClosed() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNString(int columnIndex, String value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNString(String columnLabel, String value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNClob(int columnIndex, NClob value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNClob(String columnLabel, NClob value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public NClob getNClob(int columnIndex) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public NClob getNClob(String columnLabel) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public SQLXML getSQLXML(int columnIndex) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public SQLXML getSQLXML(String columnLabel) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateSQLXML(int columnIndex, SQLXML value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateSQLXML(String columnLabel, SQLXML value) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public String getNString(int columnIndex) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public String getNString(String columnLabel) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public Reader getNCharacterStream(int columnIndex) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public Reader getNCharacterStream(String columnLabel) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNCharacterStream(int columnIndex, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateAsciiStream(int columnIndex, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateBinaryStream(int columnIndex, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateCharacterStream(int columnIndex, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateAsciiStream(String columnLabel, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateBinaryStream(String columnLabel, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } + ++ public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateClob(int columnIndex, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateClob(String columnLabel, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNCharacterStream(int columnIndex, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateAsciiStream(int columnIndex, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateBinaryStream(int columnIndex, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateCharacterStream(int columnIndex, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateAsciiStream(String columnLabel, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateBinaryStream(String columnLabel, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateClob(int columnIndex, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateClob(String columnLabel, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNClob(int columnIndex, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void updateNClob(String columnLabel, Reader reader) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++/* JDBC_4_ANT_KEY_END */ + } +--- src/test/org/apache/commons/dbcp/TesterStatement.java ++++ src/test/org/apache/commons/dbcp/TesterStatement.java +@@ -264,5 +264,26 @@ + throw new SQLException("Not implemented."); + } + /* JDBC_3_ANT_KEY_END */ ++/* JDBC_4_ANT_KEY_BEGIN */ + ++ public boolean isWrapperFor(Class iface) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public T unwrap(Class iface) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public boolean isClosed() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setPoolable(boolean poolable) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public boolean isPoolable() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++/* JDBC_4_ANT_KEY_END */ + } diff --git a/jdbc41.patch b/jdbc41.patch new file mode 100644 index 0000000..a69f3fe --- /dev/null +++ b/jdbc41.patch @@ -0,0 +1,610 @@ +Index: src/java/org/apache/commons/dbcp/BasicDataSource.java +=================================================================== +--- src/java/org/apache/commons/dbcp/BasicDataSource.java.orig 2012-05-25 11:00:29.875161362 +0200 ++++ src/java/org/apache/commons/dbcp/BasicDataSource.java 2012-05-25 11:02:59.705157897 +0200 +@@ -19,10 +19,12 @@ + + import java.io.PrintWriter; + import java.util.Properties; ++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.pool.impl.GenericKeyedObjectPool; +@@ -1277,4 +1279,10 @@ + logWriter.println(message); + } + } ++ ++ /* This functionality is not implemented yet */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } +Index: src/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java +=================================================================== +--- src/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java.orig 2007-03-25 23:51:25.000000000 +0200 ++++ src/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java 2012-05-25 11:01:48.199159547 +0200 +@@ -18,12 +18,14 @@ + package org.apache.commons.dbcp.cpdsadapter; + + import java.util.Hashtable; ++import java.util.logging.Logger; + import java.io.PrintWriter; + import java.io.Serializable; + import java.sql.DriverManager; + import java.sql.SQLException; + import javax.sql.PooledConnection; + import javax.sql.ConnectionPoolDataSource; ++import java.sql.SQLFeatureNotSupportedException; + import javax.naming.Name; + import javax.naming.Context; + import javax.naming.Referenceable; +@@ -600,4 +602,10 @@ + { + _maxPreparedStatements = maxPreparedStatements; + } ++ ++ /* This functionality is not implemented yet */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } +Index: src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java +=================================================================== +--- src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java.orig 2007-03-25 23:51:25.000000000 +0200 ++++ src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java 2012-05-25 11:02:12.245158994 +0200 +@@ -21,9 +21,11 @@ + import java.io.ObjectInputStream; + import java.sql.Connection; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.HashMap; + import java.util.Iterator; + import java.util.Map; ++import java.util.logging.Logger; + + import javax.naming.NamingException; + import javax.naming.Reference; +@@ -515,4 +517,10 @@ + throw new IOException("NamingException: " + e); + } + } ++ ++ /* This functionality is not implemented yet */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } +Index: src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java +=================================================================== +--- src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java.orig 2007-03-25 23:51:25.000000000 +0200 ++++ src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java 2012-05-25 11:02:36.557158432 +0200 +@@ -21,6 +21,8 @@ + import java.io.ObjectInputStream; + import java.sql.Connection; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.logging.Logger; + import java.util.Map; + + import javax.naming.NamingException; +@@ -254,5 +256,11 @@ + throw new IOException("NamingException: " + e); + } + } ++ ++ /* This functionality is not implemented yet */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } + +Index: src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java +=================================================================== +--- src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java.orig 2012-05-25 11:00:29.877161362 +0200 ++++ src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java 2012-05-25 11:00:44.958161014 +0200 +@@ -37,6 +37,7 @@ + import java.sql.RowId; + import java.sql.SQLXML; + /* JDBC_4_ANT_KEY_END */ ++import java.sql.SQLFeatureNotSupportedException; + + /** + * A base delegating implementation of {@link CallableStatement}. +@@ -670,4 +671,14 @@ + } + } + /* JDBC_4_ANT_KEY_END */ ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(String columnLabel, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(int columnIndex, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } +Index: src/java/org/apache/commons/dbcp/DelegatingConnection.java +=================================================================== +--- src/java/org/apache/commons/dbcp/DelegatingConnection.java.orig 2012-05-25 11:00:29.877161362 +0200 ++++ src/java/org/apache/commons/dbcp/DelegatingConnection.java 2012-05-25 11:03:21.187157402 +0200 +@@ -26,6 +26,7 @@ + import java.sql.Statement; + import java.util.List; + import java.util.Map; ++import java.util.concurrent.Executor; + /* JDBC_4_ANT_KEY_BEGIN */ + import java.sql.Array; + import java.sql.Blob; +@@ -39,6 +40,7 @@ + import java.util.Map; + import java.util.Properties; + /* JDBC_4_ANT_KEY_END */ ++import java.sql.SQLFeatureNotSupportedException; + + /** + * A base delegating implementation of {@link Connection}. +@@ -639,5 +641,31 @@ + return null; + } + } +-/* JDBC_4_ANT_KEY_END */ ++ /* JDBC_4_ANT_KEY_END */ ++ ++ /* This functionality is not implemented yet */ ++ public int getNetworkTimeout() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void abort(Executor executor) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public String getSchema() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void setSchema(String schema) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } ++ +Index: src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java +=================================================================== +--- src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java.orig 2012-05-25 11:00:29.877161362 +0200 ++++ src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java 2012-05-25 11:00:44.960161014 +0200 +@@ -34,6 +34,7 @@ + import java.sql.RowId; + import java.sql.SQLXML; + /* JDBC_4_ANT_KEY_END */ ++import java.sql.SQLFeatureNotSupportedException; + + /** + * A base delegating implementation of {@link PreparedStatement}. +@@ -411,4 +412,15 @@ + } + } + /* JDBC_4_ANT_KEY_END */ ++ ++ /* This functionality is not implemented yet */ ++ public boolean isCloseOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void closeOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } +Index: src/java/org/apache/commons/dbcp/DelegatingResultSet.java +=================================================================== +--- src/java/org/apache/commons/dbcp/DelegatingResultSet.java.orig 2012-05-25 11:00:29.878161362 +0200 ++++ src/java/org/apache/commons/dbcp/DelegatingResultSet.java 2012-05-25 11:00:44.960161014 +0200 +@@ -39,6 +39,7 @@ + import java.sql.RowId; + import java.sql.SQLXML; + /* JDBC_4_ANT_KEY_END */ ++import java.sql.SQLFeatureNotSupportedException; + + /** + * A base delegating implementation of {@link ResultSet}. +@@ -1045,4 +1046,14 @@ + } + } + /* JDBC_4_ANT_KEY_END */ ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(String columnLabel, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(int columnIndex, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } +Index: src/java/org/apache/commons/dbcp/DelegatingStatement.java +=================================================================== +--- src/java/org/apache/commons/dbcp/DelegatingStatement.java.orig 2012-05-25 11:00:29.878161362 +0200 ++++ src/java/org/apache/commons/dbcp/DelegatingStatement.java 2012-05-25 11:00:44.961161014 +0200 +@@ -22,6 +22,7 @@ + import java.sql.SQLException; + import java.sql.SQLWarning; + import java.sql.Statement; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.List; + + /** +@@ -370,4 +371,15 @@ + } + } + /* JDBC_4_ANT_KEY_END */ ++ ++ /* This functionality is not implemented yet */ ++ public boolean isCloseOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void closeOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } +Index: src/java/org/apache/commons/dbcp/PoolablePreparedStatement.java +=================================================================== +--- src/java/org/apache/commons/dbcp/PoolablePreparedStatement.java.orig 2007-03-25 23:51:25.000000000 +0200 ++++ src/java/org/apache/commons/dbcp/PoolablePreparedStatement.java 2012-05-25 11:00:44.961161014 +0200 +@@ -21,6 +21,7 @@ + import java.sql.PreparedStatement; + import java.sql.ResultSet; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.List; + + import org.apache.commons.pool.KeyedObjectPool; +@@ -117,4 +118,14 @@ + super.passivate(); + } + ++ /* This functionality is not implemented yet */ ++ public boolean isCloseOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void closeOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } +Index: src/java/org/apache/commons/dbcp/PoolingConnection.java +=================================================================== +--- src/java/org/apache/commons/dbcp/PoolingConnection.java.orig 2007-03-25 23:51:25.000000000 +0200 ++++ src/java/org/apache/commons/dbcp/PoolingConnection.java 2012-05-25 11:00:44.961161014 +0200 +@@ -20,8 +20,10 @@ + import java.sql.Connection; + import java.sql.PreparedStatement; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + + import java.util.NoSuchElementException; ++import java.util.concurrent.Executor; + + import org.apache.commons.pool.KeyedObjectPool; + import org.apache.commons.pool.KeyedPoolableObjectFactory; +@@ -314,4 +316,30 @@ + return buf.toString(); + } + } ++ ++ /* This functionality is not implemented yet */ ++ public int getNetworkTimeout() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void abort(Executor executor) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public String getSchema() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public void setSchema(String schema) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } ++ +Index: src/java/org/apache/commons/dbcp/PoolingDataSource.java +=================================================================== +--- src/java/org/apache/commons/dbcp/PoolingDataSource.java.orig 2012-05-25 11:00:29.878161362 +0200 ++++ src/java/org/apache/commons/dbcp/PoolingDataSource.java 2012-05-25 11:00:44.962161014 +0200 +@@ -23,10 +23,12 @@ + 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; + +@@ -441,4 +443,9 @@ + } + } + } ++ ++ /* This functionality is not implemented yet */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } +Index: src/java/org/apache/commons/dbcp/PoolingDriver.java +=================================================================== +--- src/java/org/apache/commons/dbcp/PoolingDriver.java.orig 2007-03-25 23:51:25.000000000 +0200 ++++ src/java/org/apache/commons/dbcp/PoolingDriver.java 2012-05-25 11:00:44.962161014 +0200 +@@ -27,6 +27,7 @@ + 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; +@@ -34,6 +35,7 @@ + import java.util.NoSuchElementException; + import java.util.Properties; + import java.util.Set; ++import java.util.logging.Logger; + + import org.apache.commons.jocl.JOCLContentHandler; + import org.apache.commons.pool.ObjectPool; +@@ -498,4 +500,10 @@ + } + } + } ++ ++ /* This functionality is not implemented yet */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } +Index: src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java +=================================================================== +--- src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java.orig 2012-05-25 11:00:29.879161362 +0200 ++++ src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java 2012-05-25 11:17:25.623137869 +0200 +@@ -18,6 +18,7 @@ + package org.apache.commons.dbcp.cpdsadapter; + + import java.util.Map; ++import java.util.concurrent.Executor; + import java.sql.Connection; + import java.sql.DatabaseMetaData; + import java.sql.PreparedStatement; +@@ -25,6 +26,7 @@ + import java.sql.Statement; + import java.sql.SQLWarning; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + /* JDBC_4_ANT_KEY_BEGIN */ + import java.sql.Array; + import java.sql.Blob; +@@ -552,4 +554,20 @@ + return connection.getClientInfo(name); + } + /* JDBC_4_ANT_KEY_END */ ++ ++ public void setSchema(String schema) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public String getSchema() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public void abort(Executor executor) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public int getNetworkTimeout() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } +Index: src/test/org/apache/commons/dbcp/TesterConnection.java +=================================================================== +--- src/test/org/apache/commons/dbcp/TesterConnection.java.orig 2012-05-25 11:00:29.911161362 +0200 ++++ src/test/org/apache/commons/dbcp/TesterConnection.java 2012-05-25 11:21:38.111132030 +0200 +@@ -22,9 +22,11 @@ + 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.concurrent.Executor; + /* JDBC_4_ANT_KEY_BEGIN */ + import java.sql.Array; + import java.sql.Blob; +@@ -339,4 +341,20 @@ + throw new SQLException("Not implemented."); + } + /* JDBC_4_ANT_KEY_END */ ++ ++ public void setSchema(String schema) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public String getSchema() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public void abort(Executor executor) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public int getNetworkTimeout() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } +Index: src/test/org/apache/commons/dbcp/TesterDriver.java +=================================================================== +--- src/test/org/apache/commons/dbcp/TesterDriver.java.orig 2007-03-25 23:51:25.000000000 +0200 ++++ src/test/org/apache/commons/dbcp/TesterDriver.java 2012-05-25 11:22:43.659130513 +0200 +@@ -22,7 +22,9 @@ + 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 java.sql.Driver interface. +@@ -122,4 +124,10 @@ + protected static int MAJOR_VERSION = 1; + protected static int MINOR_VERSION = 0; + ++ /* This functionality is not implemented yet */ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ + } +Index: src/test/org/apache/commons/dbcp/TesterPreparedStatement.java +=================================================================== +--- src/test/org/apache/commons/dbcp/TesterPreparedStatement.java.orig 2012-05-25 11:00:29.912161362 +0200 ++++ src/test/org/apache/commons/dbcp/TesterPreparedStatement.java 2012-05-25 11:39:08.412107736 +0200 +@@ -27,6 +27,7 @@ + import java.sql.ResultSet; + import java.sql.ResultSetMetaData; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.Calendar; + /* JDBC_4_ANT_KEY_BEGIN */ + import java.io.InputStream; +@@ -370,4 +371,20 @@ + throw new SQLException("Not implemented."); + } + /* JDBC_4_ANT_KEY_END */ ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(String columnLabel, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(int columnIndex, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public void closeOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public boolean isCloseOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } +Index: src/test/org/apache/commons/dbcp/TesterResultSet.java +=================================================================== +--- src/test/org/apache/commons/dbcp/TesterResultSet.java.orig 2012-05-25 11:00:29.912161362 +0200 ++++ src/test/org/apache/commons/dbcp/TesterResultSet.java 2012-05-25 11:26:54.872124703 +0200 +@@ -25,6 +25,7 @@ + import java.sql.ResultSet; + import java.sql.ResultSetMetaData; + import java.sql.SQLException; ++import java.sql.SQLFeatureNotSupportedException; + import java.sql.SQLWarning; + import java.sql.Statement; + import java.util.Calendar; +@@ -43,7 +44,7 @@ + * @author Dirk Verbeeck + * @version $Revision: 479142 $ $Date: 2006-11-25 09:31:27 -0700 (Sat, 25 Nov 2006) $ + */ +-public class TesterResultSet implements ResultSet { ++public class TesterResultSet implements ResultSet { + public TesterResultSet(Statement stmt) { + _statement = stmt; + } +@@ -967,4 +968,14 @@ + throw new SQLException("Not implemented."); + } + /* JDBC_4_ANT_KEY_END */ ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(String columnLabel, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(int columnIndex, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } +Index: src/test/org/apache/commons/dbcp/TesterStatement.java +=================================================================== +--- src/test/org/apache/commons/dbcp/TesterStatement.java.orig 2012-05-25 11:00:29.912161362 +0200 ++++ src/test/org/apache/commons/dbcp/TesterStatement.java 2012-05-25 11:39:29.973107237 +0200 +@@ -22,6 +22,8 @@ + import java.sql.SQLException; + import java.sql.SQLWarning; + import java.sql.Statement; ++import java.util.logging.Logger; ++import java.sql.SQLFeatureNotSupportedException; + + /** + * A dummy {@link Statement}, for testing purposes. +@@ -286,4 +288,20 @@ + throw new SQLException("Not implemented."); + } + /* JDBC_4_ANT_KEY_END */ ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(String columnLabel, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ ++ /* This functionality is not implemented yet */ ++ public T getObject(int columnIndex, Class type) throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public void closeOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ public boolean isCloseOnCompletion() throws SQLException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } diff --git a/pom-maven2jpp-depcat.xsl b/pom-maven2jpp-depcat.xsl new file mode 100644 index 0000000..e1042c5 --- /dev/null +++ b/pom-maven2jpp-depcat.xsl @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ERROR + + + + + + + + + + JPP + + + + + + + + + + + + + + + + + + + +ERROR + + + + + + + + + + + + + + + + + + +ERROR + + + + + + .jar + . + + + .jar + + + + + + + + + + + + diff --git a/pom-maven2jpp-mapdeps.xsl b/pom-maven2jpp-mapdeps.xsl new file mode 100644 index 0000000..d10cce7 --- /dev/null +++ b/pom-maven2jpp-mapdeps.xsl @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom-maven2jpp-newdepmap.xsl b/pom-maven2jpp-newdepmap.xsl new file mode 100644 index 0000000..ea1dcd3 --- /dev/null +++ b/pom-maven2jpp-newdepmap.xsl @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + +