pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: loading jdbc Driver in servlet
Date: Fri, 14 Dec 2018 11:28:59 -0700
Message-ID: <5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com> (raw)

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

view thread (12+ messages)  latest in thread

Message-ID: <5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com>
Permalink:  ../5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com/
Also on:    postgresql.org/message-id/5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com
  Subject: Re: loading jdbc Driver in servlet
  In-Reply-To: <5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com>
  References: <5182a498-cfde-e7a3-998d-fea79bedaf35@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox