Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C7DA11498 for ; Thu, 4 Sep 2014 04:36:55 +0000 (UTC) Received: (qmail 48605 invoked by uid 500); 4 Sep 2014 04:36:53 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 48488 invoked by uid 500); 4 Sep 2014 04:36:53 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 48477 invoked by uid 99); 4 Sep 2014 04:36:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Sep 2014 04:36:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.216.178] (HELO mail-qc0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Sep 2014 04:36:25 +0000 Received: by mail-qc0-f178.google.com with SMTP id x13so9727043qcv.23 for ; Wed, 03 Sep 2014 21:36:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=sT4oZAkIAH4G7ZbBGjdOd9J5wneIM12GGVpKXAd+NMM=; b=iSMyj14lenGEjpmJ1D3ZPCrc73v8vWzHc+9GHxrg1Hbnuwj7AzcTtM9hwLzo8P6rLM +57O3zCULV2WVXv8xFy+rITsz7Ax+vm52VYxBeXO0mTOg2WlUbZo3XWpByFAIAo2zCzI g+GlTo/807CbQucOv/gc4MQKkKRA4szdDnUf1ABRVQg0AcgNFU9R8T3sCmSFuD1Jsvlm EUQL43E+mZgik2e1jtcpqfLpSy25Jnond6mRMsWvNPcdfQqt1CXD4w18oOpqJyS6UFQx H97X9JDwhNzlg3ae4TmN7b8+Y8SthxGuWQAvoZOaNkLXvwDkYi4AUVyPjLDVY5Q8DRBl BRrg== X-Gm-Message-State: ALoCoQn5n6mnwahChcyaeC7N2nh3qmkHQ5nikjPsFKJ9RYl1Y5G/dF5gUisoJMVRfzCQNq89Vblj X-Received: by 10.224.130.201 with SMTP id u9mr3363873qas.58.1409805383918; Wed, 03 Sep 2014 21:36:23 -0700 (PDT) Received: from localhost (HSI-KBW-109-193-068-033.hsi7.kabel-badenwuerttemberg.de. [109.193.68.33]) by mx.google.com with ESMTPSA id c7sm18730138qam.8.2014.09.03.21.36.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Sep 2014 21:36:23 -0700 (PDT) Date: Thu, 4 Sep 2014 06:36:17 +0200 From: Bernd Eckenfels To: Commons Users List Cc: Noriyuki Torii Subject: Re: [POOL-276] Validation code invoked on unexpected timing. Message-ID: <20140904063617.00001603.ecki@zusammenkunft.net> In-Reply-To: References: <5407C1CB.3010004@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, your JIRA report looks good! I took the liberty to modify it a bit and included JIRA markup {code} before and after the code, so it does do formatting and syntax highliting. BTW: I added some more print in my local version of your reproducer and adding the thread name, so it is clear when things are happening. The output reproduces the following sequence: 1409804599167 main Created 0 379cbef5-3e40-4f39-af5f-ac3e76506e81 1409804599229 main Wrapped 0 379cbef5-3e40-4f39-af5f-ac3e76506e81 1409804599229 main Validated 1 379cbef5-3e40-4f39-af5f-ac3e76506e81 1409804599229 main Borrowed 1 379cbef5-3e40-4f39-af5f-ac3e76506e81 1409804602256 Timer-0 Returning 1 379cbef5-3e40-4f39-af5f-ac3e76506e81 1409804602256 main Validated 2 379cbef5-3e40-4f39-af5f-ac3e76506e81 1409804602256 main Borrowed Again 2 379cbef5-3e40-4f39-af5f-ac3e76506e81 Just in case anybody wondered, it is happening after the return in the borrow thread. Gruss Bernd Am Thu, 4 Sep 2014 12:27:39 +0900 schrieb Noriyuki Torii : > Hi, Phil. > Thanks for your response. > > I opened a ticket for this issue as POOL-276. > In fact, I am a newbie of JIRA. So if there are any mistakes on this > ticket, please let me know. > > Regards, > > 2014-09-04 10:35 GMT+09:00 Phil Steitz : > > On 9/3/14 9:27 AM, Noriyuki Torii wrote: > >> Hi, all. > >> > >> I found BasePooledObjectFactory.validateObject() of commons-pool > >> sometimes called > >> on unexpected timing and I cannot identify the cause. > >> So I would like to ask some advice. > >> > >> I've configured the pool so as to the validateObject() would be > >> invoked only on instance > >> creation, but sometimes it was invoked for "non-fresh" instance on > >> borrowing. > >> > >> I also attach small reproduction code below. > >> Can anyone tell it is because some lack of configurations, or, > >> actual pool's bug? > > > > Thanks for reporting this. Looks like it could be a pool bug. Do > > you mind opening a JIRA ticket for this? > > > > Phil > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org