Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfACQ-00063N-2e for pgsql-jdbc@arkaria.postgresql.org; Tue, 17 Nov 2020 23:15:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfACN-0003jM-LL for pgsql-jdbc@arkaria.postgresql.org; Tue, 17 Nov 2020 23:15:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfACN-0003jF-Dx for pgsql-jdbc@lists.postgresql.org; Tue, 17 Nov 2020 23:15:43 +0000 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kfACK-0007TF-Pc for pgsql-jdbc@lists.postgresql.org; Tue, 17 Nov 2020 23:15:43 +0000 Received: by mail-io1-xd31.google.com with SMTP id o11so23030142ioo.11 for ; Tue, 17 Nov 2020 15:15:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=YpHHK3fKEKSwDnLb6UVq+He4jG3N6NfWbwN8LjlLqRY=; b=bj6+WuagH9mXeooy8AQXdIpV+gpiphcVGnUqcLm8fo+vz7rwxvzhPkUAkVv2GkfRdW c07cMvH1QW+y0H+nxsKI4dEeKyouRdi9G5l994zz/QBy3XVxu2U+hjrXk6MVVRjPmyhQ bPqMxhl5Q6XeVS7wj/uXKkRqMhekNHj2OTOYcRL5PWZTvCpSIAhMiGucHydsOI2r9lS2 W4AtUp7K1cwYmkSDNXhz3qVgRrMjNEFyswO6D29I4+BXpVTtrMG8md9CiIWr2X7/UXIk gtamyXLA9kLwv2jqY68j8FQsOCU5ESI9os9CsiabirOf0iACVt/ac3fuMrDB3BBKV+6X URTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=YpHHK3fKEKSwDnLb6UVq+He4jG3N6NfWbwN8LjlLqRY=; b=L17LNkph+CKLvt8KGJYS7Xr6f0PZvTRDunljSnJ/0mImQ/ZtlfdH/+qpRTExhv+lp3 GZdDy6bRYx/2oT5liS2KVM4qvMTmAw6AsziNZ9g7MHp4dhnvPaBVgeWMQPqRifiv5jXp UT52inJNx3Dito6eu+O9TM0wNTKhlkzjoResw2cjriJjQ8sS90ZiwfAFUshctGVF29Wy M/zXXxYZpDxhdy4I16MA4MSRfsllBTmNKGVmRJC5boWSXLpsqvDz2EXJykLqUTMGAFES 2DDU/a3BHAtvLL/5VpJ0HeMF+AFZV/Eb2L2lnI7D4C7wsl1wuG3K0PderzpsGNAl6SU6 QUGw== X-Gm-Message-State: AOAM533vWxgU5urupe91ZLY3gS3u4uH0l06O+qA7wwcJCYYV8m7nN3cX Pv1mEkTarXc9O+J4NIdozPPolxcf/D8= X-Google-Smtp-Source: ABdhPJzWyq57fS2Vjmahb8t8smUCx547osgjc6HFqYY/EAhRVrhfV8+Bwrb8UaSdD4hxhEGYv/qdwA== X-Received: by 2002:a02:9589:: with SMTP id b9mr5808242jai.39.1605654938464; Tue, 17 Nov 2020 15:15:38 -0800 (PST) Received: from ?IPv6:2601:681:5500:dde0:d8a4:2cd1:b962:ca9b? ([2601:681:5500:dde0:d8a4:2cd1:b962:ca9b]) by smtp.gmail.com with ESMTPSA id z17sm15215061ilk.53.2020.11.17.15.15.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Nov 2020 15:15:38 -0800 (PST) Subject: Re: embeded tomcat and correct DataSource. To: Dave Cramer Cc: "pgsql-jdbc@lists.postgresql.org" References: <0f62f2cb-7474-0af5-3bbe-c3747c079dcb@gmail.com> From: Rob Sargent Message-ID: <30d1835c-069f-05d2-8b05-3a9f00f45bf3@gmail.com> Date: Tue, 17 Nov 2020 16:15:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------4CE3F6C67471077475E9743A" Content-Language: en-CA List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------4CE3F6C67471077475E9743A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 11/17/20 3:15 PM, Dave Cramer wrote: > I haven't setup an embedded tomcat in a while. I'd like to know the > answer as well. > > Any reason you aren't using something like quarkus ? > > Dave Cramer > www.postgres.rocks > > > On Mon, 16 Nov 2020 at 12:05, Rob Sargent > wrote: > > Asking for confirmation that, when using an embedded tomcat > instance, I should use the PGConnectionPoolDataSource if I wish to > use Apache connection pool mechanism. > > Well I was just shooting for the shortest stack possible.   This is a home-grown server doing a very specific task, very specific clients (science stuff, neither Sir Elton nor I understand) My current working version has me managing a bare socket with a Selector.  But there are a couple of brittle parts there so a dear friend (still laughing up his sleeve I'm sure) suggested embedding tomcat to leverage their selector impl and http support.  Tests using DriverManager are working, now I think my last hurdle to using a DataSource is a jOOQ/java date/time issue.  I'm not at all sure I've wired the DataSource in correctly, but examples using embedded tomcat are rare as hen's teeth. --------------4CE3F6C67471077475E9743A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


On 11/17/20 3:15 PM, Dave Cramer wrote:
I haven't setup an embedded tomcat in a while. I'd like to know the answer as well.

Any reason you aren't using something like quarkus ?

Dave Cramer


On Mon, 16 Nov 2020 at 12:05, Rob Sargent <robjsargent@gmail.com> wrote:

Asking for confirmation that, when using an embedded tomcat instance, I should use the PGConnectionPoolDataSource if I wish to use Apache connection pool mechanism.

 

Well I was just shooting for the shortest stack possible.   This is a home-grown server doing a very specific task, very specific clients (science stuff, neither Sir Elton nor I understand) My current working version has me managing a bare socket with a Selector.  But there are a couple of brittle parts there so a dear friend (still laughing up his sleeve I'm sure) suggested embedding tomcat to leverage their selector impl and http support.  Tests using DriverManager are working, now I think my last hurdle to using a DataSource is a jOOQ/java date/time issue.  I'm not at all sure I've wired the DataSource in correctly, but examples using embedded tomcat are rare as hen's teeth.
--------------4CE3F6C67471077475E9743A--