| From: | Steven Schlansker <stevenschlansker(at)gmail(dot)com> |
|---|---|
| To: | Tecno Brain <cerebrotecnologico(at)gmail(dot)com> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: Is it possible to load two different versions of the JDBC driver in the same application? |
| Date: | 2014-04-11 21:32:10 |
| Message-ID: | 1EB80178-5259-4566-8577-241B20F73E94@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
On Apr 11, 2014, at 2:28 PM, Tecno Brain <cerebrotecnologico(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John R Pierce | 2014-04-11 21:32:52 | Re: Is it possible to load two different versions of the JDBC driver in the same application? |
| Previous Message | Tecno Brain | 2014-04-11 21:28:32 | Is it possible to load two different versions of the JDBC driver in the same application? |