pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steven Schlansker <stevenschlansker@gmail.com>
To: Tecno Brain <cerebrotecnologico@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Is it possible to load two different versions of the JDBC driver in the same application?
Date: Fri, 11 Apr 2014 14:32:10 -0700
Message-ID: <1EB80178-5259-4566-8577-241B20F73E94@gmail.com> (raw)
In-Reply-To: <CANj+m=hkR13h6hRcLbfAfrHi8E7wRVbRM2SSvFGrzAg46foh_Q@mail.gmail.com>
References: <CANj+m=hkR13h6hRcLbfAfrHi8E7wRVbRM2SSvFGrzAg46foh_Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>


On Apr 11, 2014, at 2:28 PM, Tecno Brain <cerebrotecnologico@gmail.com> wrote:

> I have a Java application that is using Postgres 9.1, and we use the latest 9.1 JDBC driver.
> The same Java app requires access now to a Redshift cluster. Amazon recommends to use a Postgres 8 JDBC driver.

Why?  That’s ancient!  Have you tested that the newer driver does not work?

> 
> Can I load both drivers in the same application ? 

Technically, yes.  You can load each driver in a separate classloader.  You may wish to look into a container solution like OSGI if you go this path.

I wouldn’t recommend it.  Diagnosing problems when multiple class loaders have the same classes loaded but different versions will quickly melt your brain into a puddle of mush.



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (4+ messages)  latest in thread

Message-ID: <1EB80178-5259-4566-8577-241B20F73E94@gmail.com>
Permalink:  ../1EB80178-5259-4566-8577-241B20F73E94@gmail.com/
Also on:    postgresql.org/message-id/1EB80178-5259-4566-8577-241B20F73E94@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-jdbc@postgresql.org
  Cc: stevenschlansker@gmail.com, cerebrotecnologico@gmail.com
  Subject: Re: Is it possible to load two different versions of the JDBC driver in the same application?
  In-Reply-To: <1EB80178-5259-4566-8577-241B20F73E94@gmail.com>
  References: <CANj+m=hkR13h6hRcLbfAfrHi8E7wRVbRM2SSvFGrzAg46foh_Q@mail.gmail.com> <1EB80178-5259-4566-8577-241B20F73E94@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