Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXsCz-0002AH-7v for pgsql-general@arkaria.postgresql.org; Fri, 14 Dec 2018 18:29:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gXsCw-000360-PU for pgsql-general@arkaria.postgresql.org; Fri, 14 Dec 2018 18:29:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXsCw-00035n-Ep for pgsql-general@lists.postgresql.org; Fri, 14 Dec 2018 18:29:06 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gXsCt-0002ZV-Tn for pgsql-general@postgresql.org; Fri, 14 Dec 2018 18:29:06 +0000 Received: by mail-pf1-x431.google.com with SMTP id i12so3219871pfo.7 for ; Fri, 14 Dec 2018 10:29:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=e3yf6IAZER+P3/vtyIrBz47FCRfEM+lA8fb97HT+MXk=; b=JE/EW75mQOWGPSiS0Ee++4ZNWDL/PYyJNaZMXHxqh6gpNNTESpDh+stkBVSH42PGaE AQ0/UlkiqtVWLgGzrFRw35F5j4hz41LHt9c7sUdE8+ZkCgxpU971MD6V5ClpbsxAUkpo R8SBY9poEh9j6qVcj3TzL9LgRNASjTFEB4Of1kSc5kO/p+9cAbGRqLB4Fi6YESu3Zk34 fi8WYG4cTjHdOkK8Jf3nQb9fn6c1pMYHmvnzhvQSQPGcN8+WhF18ODjPTriP157Bpqpq n9pepXfk4OVvlyng9Emme6wBRpr3S6+8juHyKtQeqTA4eNk+ubK5e2eMpedIS9QCZzkz cmAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=e3yf6IAZER+P3/vtyIrBz47FCRfEM+lA8fb97HT+MXk=; b=EpbqeVCZy3DdNmfJRzNvcmGVv05dT75JQqYju3IUJSlEh0LpJcb9nA2BM/kUa5NHhE +GlvD5uarXdtGqPieQ6B1FpY5E+bUHTyZCnWjVr70UXSO2HBBJ8gnvAJKDlJKOagJqSE W7glu//z6KYRghwUfW53nEUGquhla3C+jGNT2ND4rK9csiLiav5nUtzo8PY9OV+cVbYe 7bAXGeETr5ufNklgeBAdvJwTrQI2lxQjDy37s/fqkQUDX3PUiv2GW2FTaYtZa2U+6fDh fwnoc3XPNwGhPxORmlfpJD8uJww7ovuS7AOLhFCxmt035WJCK3xSfFb2Eyu/S5CaLua9 1tcw== X-Gm-Message-State: AA+aEWbHunxI+XmLNRf85qsY5Pyy8BiWAwoN/z0eeGqTHNqwRszV5Z0Z 4XDoZCvU2AnvvK0flE/b602CpKj3 X-Google-Smtp-Source: AFSGD/XYPlNYPnQNl0iY6NkKXqQsov0ucfT7uK5vCp8XXXC2Opvb/9BGDNO3pwdOnKdUSmqm9lFTZw== X-Received: by 2002:a62:be15:: with SMTP id l21mr3716888pff.51.1544812141069; Fri, 14 Dec 2018 10:29:01 -0800 (PST) Received: from [10.104.134.14] ([155.100.47.6]) by smtp.gmail.com with ESMTPSA id i123sm9537943pfg.164.2018.12.14.10.29.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 10:29:00 -0800 (PST) To: "pgsql-general@postgresql.org" From: Rob Sargent Subject: loading jdbc Driver in servlet Message-ID: <5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com> Date: Fri, 14 Dec 2018 11:28:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------034C6168AD8514A7069C07A3" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------034C6168AD8514A7069C07A3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Using java 1.8, postgresql-42.1.4.jar, embedded tomcat 9 It appears to me that I need to make the call "Class.forName("org.postgresql.Driver)" when the entry is in a servlet.  Is this expected, within a servlet, or is this just /post hoc ergo propter hoc /at it finest and I changed something else (wittingly or not).  Same code outside of servlet does not need the forced loading of the class and the manual claims it's not need after java 1.6 --------------034C6168AD8514A7069C07A3 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Using java 1.8, postgresql-42.1.4.jar, embedded tomcat 9

It appears to me that I need to make the call "Class.forName("org.postgresql.Driver)" when the entry is in a servlet.  Is this expected, within a servlet, or is this just post hoc ergo propter hoc at it finest and I changed something else (wittingly or not).  Same code outside of servlet does not need the forced loading of the class and the manual claims it's not need after java 1.6

--------------034C6168AD8514A7069C07A3--