pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@2ndquadrant.com>
To: Kevin Wooten <kdubb@me.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: A new JDBC driver...
Date: Thu, 14 Mar 2013 12:56:45 +0800
Message-ID: <5141588D.9030405@2ndquadrant.com> (raw)
In-Reply-To: <C456E460-078E-4562-8921-39000ED4D71A@me.com>
References: <C456E460-078E-4562-8921-39000ED4D71A@me.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

On 03/12/2013 09:19 AM, Kevin Wooten wrote:
>
> * Asynchronous I/O engine provided by Netty
> * All connections share a single group of worker threads
That's going to cause serious issues on Java EE, especially when
unloading applications. Since you're on JDBC4 you can have init and
cleanup functions to manage the thread pool, but these are vital. I
asked about this re PgJDBC quite some time ago and got some good
information that's summarized here:

http://stackoverflow.com/q/8514725/398670

Failure to properly shut the thread pool down when a servlet or
application is unloaded will cause classloader leaks, tending to lead to
PermGenSpace exhaustion errors and other problems. The driver will
probably need application-server-specific integration hooks too.

As for the "multiple JARs" converns, it's trivial to bundle dependencies
inside the JDBC driver jar. However, this can cause issues if there's an
incompatible version of the same library elsewhere on the classpath.
It's OK if you're on a modern application server like JBoss AS 7 that
isolates classloader chains, but it can be a real problem on older
platforms and standalone applications. For this reason both a rollup
version of the jar and a version without bundled libraries would
probably be needed, but this is trivial to produce from Maven.

Overall I think this is an intriguing idea, whether it proves to be an
ideas testbed or something that becomes appealing to adopt more
seriously. Congratulations on tackling it.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

view thread (31+ messages)  latest in thread

Message-ID: <5141588D.9030405@2ndquadrant.com>
Permalink:  ../5141588D.9030405@2ndquadrant.com/
Also on:    postgresql.org/message-id/5141588D.9030405@2ndquadrant.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-jdbc@postgresql.org
  Cc: craig@2ndquadrant.com, kdubb@me.com
  Subject: Re: A new JDBC driver...
  In-Reply-To: <5141588D.9030405@2ndquadrant.com>
  References: <C456E460-078E-4562-8921-39000ED4D71A@me.com> <5141588D.9030405@2ndquadrant.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