Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 680EB200C08 for ; Thu, 26 Jan 2017 19:28:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 64F87160B4C; Thu, 26 Jan 2017 18:28:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AE244160B31 for ; Thu, 26 Jan 2017 19:28:44 +0100 (CET) Received: (qmail 40495 invoked by uid 500); 26 Jan 2017 18:28:43 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 40482 invoked by uid 99); 26 Jan 2017 18:28:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jan 2017 18:28:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id F214FC0939 for ; Thu, 26 Jan 2017 18:28:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.481 X-Spam-Level: ** X-Spam-Status: No, score=2.481 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=masslight-net.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dqaq9syLMINA for ; Thu, 26 Jan 2017 18:28:37 +0000 (UTC) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 6265D5F1F4 for ; Thu, 26 Jan 2017 18:28:37 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id r144so98878006wme.1 for ; Thu, 26 Jan 2017 10:28:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=masslight-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=apXAPuQrzLYiFbZTGXM7bgdrd9uG2mFPYEYRXDBn5dQ=; b=WQijBFL89v1BAtbiWSKLPETMlrY+AWCVrWMxp00ewpTTYkGLG7m19m7Ka5wSnt870l TxJiNoGrW+Xp33SdrRyaoAxhvj8kXWBWGUxQefLpimP62QGjW6VzjqN/TEVa7CkgOsFl fJcJn9Wjq5+FkWd5mcYgr9+txJOG0WdsF8UhKSBkS05HD/GwCFWsJEHewX7HFxtDdEQw 0w2WOnJ5Qd2ptKR1QiYqI+6+fjqN6mcuSs1J1tpEPeEsVlTUQz18uitfc6K9Jy6mQQlR clpmBsc4QCuIYW7uWvK1ZD7S4RD9C+aCYB8I/zciwNaPEa4ZYIeQQ7dXbbWOly+oeuc3 /X4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=apXAPuQrzLYiFbZTGXM7bgdrd9uG2mFPYEYRXDBn5dQ=; b=Rxl7Ohv7qnhqQwiqGuAyZdqcHyMK+bS5ncFCXYL5qd3mIQuVgp6frMfaHTMbflDG9m o6LnbxI1+5gN7kcN76fraat6J+leaU9Bnd3Gk20ELNAhDql16v/fTU91/tIS6P+6A6oa +Hx6m4hhb76gp7UaQTbPO/5uxkjtledefjvKRTRjjWynDoJH1TzLIxqHhsT8yCh9N2RK 2/sUZlQ91KaJtptN2Rh2qt5f422o9TXGVFwW/nQ1Q9Nm+Fak/idwnai0xd2rRFiddiel TowE9Tjp6nnX917ut5sTUKkE8lei7mbHoMA9zlBWCtkX/CowOHX/Ti7y7nRDe9pyx2cp 2FVg== X-Gm-Message-State: AIkVDXKFUlwvxggqi9q5F8nE3qfYIixYFJwUciWKULBkgBZl7JgdMFxawr54p/rJGEzywN6KUeVla3s5L1jXdQ== X-Received: by 10.223.171.66 with SMTP id r2mr3944624wrc.71.1485455316374; Thu, 26 Jan 2017 10:28:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.185.68 with HTTP; Thu, 26 Jan 2017 10:28:16 -0800 (PST) In-Reply-To: <83D249F1-A12C-4F89-8DA3-E1FC681747DB@mackoy.de> References: <83D249F1-A12C-4F89-8DA3-E1FC681747DB@mackoy.de> From: Michael Gentry Date: Thu, 26 Jan 2017 13:28:16 -0500 Message-ID: Subject: Re: Using multiple Db connections to single Database To: Cayenne Users Content-Type: multipart/alternative; boundary=94eb2c1b4fd076702a0547038429 archived-at: Thu, 26 Jan 2017 18:28:45 -0000 --94eb2c1b4fd076702a0547038429 Content-Type: text/plain; charset=UTF-8 Hi Alexander, I'm not sure which connection feature (DataSource Factory) you are using to connect to the DB (Driver, JNDI, or DBCP), but all three of those use a connection pooling mechanism. When you ask an Object/Data Context to perform a query or commit changes, it borrows a connection from the connection pool, does some SQL, then returns the connection back to the pool where it can be re-used later. If you don't have multiple simultaneous query/commit changes occurring across multiple Object/Data Contexts, it makes perfect sense to see one connection get used a lot (really depends on the connection pooling mechanism, though) and the others to be idle. This is working as-designed. If you starting doing more things in parallel, you'll see more connections get used. mrg On Thu, Jan 26, 2017 at 11:05 AM, Alexander Uherek wrote: > Hello, > > I am using Cayenne 3.0.2 together with the play Framework (1.2.7). > I configured the framework to use a pool of 10 DB-connections, which > according to pg_stats are opened and idle. > Unfortunatly only one connection is used for my Cayenne Queries. > Do you have any hints? > > > Alexander Uherek > IT-Services > > mackoyCONSULTING > Schloss Seefeld | Hochschloss > 82229 Seefeld > Tel. +49 8152/92989-82 > Fax +49 8152/92989-89 > > auherek@mackoy.de > www.mackoy.de > --94eb2c1b4fd076702a0547038429--