Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 25D2B1897B for ; Wed, 7 Oct 2015 18:54:38 +0000 (UTC) Received: (qmail 6660 invoked by uid 500); 7 Oct 2015 18:54:33 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 5840 invoked by uid 500); 7 Oct 2015 18:54:33 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 5829 invoked by uid 99); 7 Oct 2015 18:54:33 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Oct 2015 18:54:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BF0D7180E21 for ; Wed, 7 Oct 2015 18:54:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.881 X-Spam-Level: ** X-Spam-Status: No, score=2.881 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=hannonhill.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id dr7zTl4GBtBV for ; Wed, 7 Oct 2015 18:54:21 +0000 (UTC) Received: from mail-ig0-f179.google.com (mail-ig0-f179.google.com [209.85.213.179]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 4CB7D20F10 for ; Wed, 7 Oct 2015 18:54:20 +0000 (UTC) Received: by igbkq10 with SMTP id kq10so115615057igb.0 for ; Wed, 07 Oct 2015 11:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hannonhill.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=JxXi4vRzGfrVLSN9/XhQ/JNj+/j/xnJlhDtsQ8aRWB0=; b=BVLAt2ROH54E+9hZtcH2IkKEvL7Z2ha6UMCTtKNhu0VZNQHuKC9Vz86qShOfpoJPYY i01ilcMwez/uw9Xv5or3Ul265ffih2mRoKRFBJj6aAqZoxfqfBr/mvuEZ7ZhdrJuSl6t p37cZjwGkl5PHDTyfgbMp12RKfNDg/Bcczq64= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; bh=JxXi4vRzGfrVLSN9/XhQ/JNj+/j/xnJlhDtsQ8aRWB0=; b=SM5FRVoaApP3V5rTCjH/vpdbbxS4OT/l9BEZc4xcLUUN5Mf4iJjr7FD8IAz/tGsccn dfiv3IDXyEmKnxYGITe+utn6AgXwtVctv5EROakawEmUvpnOTeiKj3zM42taeQH7UfHb DZ6cothjtldj12biZQHaxHBqx6bFxUC9oOjEDmTN8SLIaa0B48EzEccd+yN5PLIUk/g3 +4zgk8HXBfUZutDW6yDNnchQZwRk5Qvhqd0wBmaf/kgu8h+bqwAZjz0mREgXRWs+bbzK ysZR6w6sgMUYQIQjiW6Nok7mZC3ncbvORl9/O0WSBxnw+8hBib1dfw8mutAYtVM3ta2A b3EA== X-Gm-Message-State: ALoCoQloaedo4XUZmP1RPJZrKDKXnEO5OfrbZTskScOCcXSoWXYEUH/pzDY9nEANvDFUf8/9eqWE X-Received: by 10.50.142.105 with SMTP id rv9mr25852642igb.32.1444244059132; Wed, 07 Oct 2015 11:54:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bradley Wagner Date: Wed, 07 Oct 2015 18:54:09 +0000 Message-ID: Subject: Re: DBCP params different for the Tomcat DBCP implementation in Tomcat 8? To: Tomcat Users List Content-Type: multipart/alternative; boundary=001a11c3d4ee1d6ebd05218846fc --001a11c3d4ee1d6ebd05218846fc Content-Type: text/plain; charset=UTF-8 Did not what? We added "factory='org.apache.tomcat.jdbc.pool.DataSourceFactory'". That switched us to Tomcat DBCP, correct? At that time, we were using the updated "maxWaitMillis" and "maxTotal" in our context.xml and Tomcat didn't seem to complain on startup. Then, when we tried to set "maxWaitMillis" on a manually created Tomcat DBCP dataSource: "" in a test at which point we got an error about that class not having a 'maxWaitMillis' setter. Was the Tomcat DBCP we were using in our context.xml just failing silently or ignoring the 'maxWaitMillis' and 'maxTotal' params and we didn't realize it? Are the params here: https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html mean to be the definitive ones for Tomcat DBCP? On Wed, Oct 7, 2015 at 2:46 PM Konstantin Kolinko wrote: > 2015-10-07 21:36 GMT+03:00 Bradley Wagner : > > Hi, > > > > We recently upgraded to Tomcat 8. As per the Migration Guide: > > https://tomcat.apache.org/migration-8.html#Database_Connection_Pooling > and > > DBCP documentation > > > https://tomcat.apache.org/tomcat-8.0-doc/jndi-datasource-examples-howto.html#Database_Connection_Pool_(DBCP_2)_Configurations > , > > we switched to using the new param values like: maxTotal and > maxWaitMillis. > > > > Then, we switched to using the Tomcat DBCP by adding > > factory="org.apache.tomcat.jdbc.pool.DataSourceFactory". Tomcat did not > > seem to have a problem with using Tomcat DBCP with the updated param > names. > > No, you did not. The above factory is for "Tomcat JDBC" pool > implementation. > > It was inspired by DBCP1, but is different from both Commons DBCP1 > (used by default in Tomcat 6, 7) and Commons DBCP2 (used by default in > Tomcat 8). > > > Then, I modified a test we were running to also use a Spring > initialized, > > Tomcat DBCP DataSource: > > > > > destroy-method="close"> > > > > Now, our test is complaining with: "Bean property 'maxWaitMillis' is not > > writable or has an invalid setter method." because we were using the new > > style param name: > > > > > > > > So now I'm confused. > > > > 1. Does Tomcat DBCP (in Tomcat 8) indeed use different params than the > new > > DBCP2 that ships with Tomcat 8? > > 2. Why did Tomcat not complain when I was using maxWaitMillis with the > > updated factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" but does > > complain when I try to instantiate that pool implementation's DataSource > > directly? > > 3. Is there some other way that I should be instantiating the Tomcat DBCP > > DataSource in my test that would be more appropriate? > > > > I searched the archives and couldn't find mention of this. > > > > Thanks! > > > > > > -- > > Bradley Wagner > > VP Engineering, Hannon Hill > > www.hannonhill.com | Twitter | Github > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > -- Bradley Wagner VP Engineering, Hannon Hill www.hannonhill.com | Twitter | Github --001a11c3d4ee1d6ebd05218846fc--