Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 7395 invoked from network); 16 Dec 2009 11:37:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Dec 2009 11:37:19 -0000 Received: (qmail 30642 invoked by uid 500); 16 Dec 2009 11:37:18 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 30493 invoked by uid 500); 16 Dec 2009 11:37:17 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 30017 invoked by uid 99); 16 Dec 2009 11:37:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2009 11:37:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of phil.steitz@gmail.com designates 74.125.92.150 as permitted sender) Received: from [74.125.92.150] (HELO qw-out-1920.google.com) (74.125.92.150) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2009 11:37:07 +0000 Received: by qw-out-1920.google.com with SMTP id 14so169869qwa.60 for ; Wed, 16 Dec 2009 03:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=GVj6LgTTHaxgPRRG3HWJh7sE9kVspzSXCqOrd2kSryE=; b=YQ+OI1KnYnqw8wD6TBIuZhlyKpABCXVMghje7n0lrT5KDsC8DUiQyyn1RTzRGez9P3 KRh053IoBitqxhKM2nw4R2VjSavvng4VhVfEjM1PE9cf/o0y1haSTFzNaT5b6pcRvZBx Zi8PDA1HuN1kLRfTiLyX19MVuWW+zZxMn4JdM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=scvFAyI/KXIb41i1XRpe0jOdM7+adIrcw1zHddhwq9pT1HzGdE0662mHnrQUIcS9QD mjmWhVYtWRdbcTcESHMODtDeFYeSSpfvWFtGqhLCIJV0q7vUKgI3AdnR/U9PLJ4l5mQ3 mH2bhRRrZRpsYOkFH83xKdAeYc3sAv80W8+AI= Received: by 10.224.91.8 with SMTP id k8mr559190qam.216.1260963406308; Wed, 16 Dec 2009 03:36:46 -0800 (PST) Received: from phil-steitzs-macbook-pro.local (c-76-99-90-51.hsd1.de.comcast.net [76.99.90.51]) by mx.google.com with ESMTPS id 22sm629469qyk.10.2009.12.16.03.36.45 (version=SSLv3 cipher=RC4-MD5); Wed, 16 Dec 2009 03:36:45 -0800 (PST) Message-ID: <4B28C64C.5030003@gmail.com> Date: Wed, 16 Dec 2009 06:36:44 -0500 From: Phil Steitz User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Commons Developers List Subject: Re: [dbcp] 1.3/1.4 RC1 available for review References: <4B1CE902.8050509@gmail.com> <4B23F991.7080509@gmail.com> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Jörg Schaible wrote: > Jörg Schaible wrote: > >> Jörg Schaible wrote: >> >>> Hi Phil, >>> >>> Phil Steitz wrote: >>> >>> [snip] >>> >>>>>> 1.4 (JDBC 4) version: >>>>>> http://people.apache.org/~psteitz/dbcp-1.4-rc1 >>>>>> http://people.apache.org/~psteitz/dbcp-1.4-rc1/site >>>>>> http://people.apache.org/~psteitz/dbcp-1.4-rc1/maven >>>>>> http://svn.apache.org/repos/asf/commons/proper/dbcp/tags/DBCP_1_4_RC1/ >>>>> Builds from source and runs tests with IcedTea6 1.6.2, Sun JDK 1.6 and >>>>> Sun JDK 1.7.0.0.alpha69 (add to README.txt ?!?). However it fails with >>>>> IBM 1.6.0.6: >>>>> >>>>> ========================== %< ================================ >>>>> > ------------------------------------------------------------------------------- >>>>> Test set: org.apache.commons.dbcp.managed.TestBasicManagedDataSource >>>>> > ------------------------------------------------------------------------------- >>>>> Tests run: 46, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.398 >>>>> sec <<< FAILURE! >>>>> > testReallyClose(org.apache.commons.dbcp.managed.TestBasicManagedDataSource) >>>>> Time elapsed: 0.066 sec <<< FAILURE! >>>>> junit.framework.AssertionFailedError: Expecting SQLException - >>>>> XAResources orphaned >>>>> at junit.framework.Assert.fail(Assert.java:47) >>>>> at >>>>> > org.apache.commons.dbcp.managed.TestBasicManagedDataSource.testReallyClose(TestBasicManagedDataSource.java:72) >>>> I could use some help debugging this one. I do not have the JDK to >>>> test with and the failure makes no sense to me. Does it happen >>>> every time? >>> It seems it was caused by a difference in the WeakReference >>> implementation. The DelegactingConnection returned the same hashCode than >>> the inner connection. However, both instances were kept in the registry >>> in xaReference (a WeakMap). Need to figure out why that is happening. This could be a test bug. The connection should only be added once to the registry. After using a distinguishable hashCode, the >>> test succeeds also with IBM JDK. >>> >>> Additionally I dropped the JDK 1.4 deps from the POM. That is OK for the trunk POM. Thanks. >>> >>> I'll look into DBCP 1.3 ASAP - it got too late now ;-) >> Guess it was really too late yesterday. While TestBasicManagedDataSource >> works now, my change borked the TestManagedDataSourceInTx tests >> (interestingly 33 with Sun JDK, but only 28 with IBM). Basically my change >> broke the contract with hashCode that should be the same for "equal" >> objects. >> >> Question is now, what to do. If we revert the change, the IBM JDK is >> broken and it fails to release the transactions. Otherwise we have to >> change additionally the equals method, so that a DelegatingConnection is >> not equal to the wrapped Connection. However, this may case even more >> hick-ups. > > I've reverted the hashCode change for now that brings back the IBM JDK > problem. :-/ Thanks, Jorg. I think changing equals is not a good idea. Thanks again for your help. Phil > > - Jörg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org