pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedIs it possible to load two different versions of the JDBC driver in the same application?
4+ messages / 3 participants
[nested] [flat]
* Is it possible to load two different versions of the JDBC driver in the same application?
@ 2014-04-11 21:28 Tecno Brain <cerebrotecnologico@gmail.com>
2014-04-11 21:32 ` Re: Is it possible to load two different versions of the JDBC driver in the same application? Steven Schlansker <stevenschlansker@gmail.com>
2014-04-11 21:32 ` Re: Is it possible to load two different versions of the JDBC driver in the same application? John R Pierce <pierce@hogranch.com>
0 siblings, 2 replies; 4+ messages in thread
From: Tecno Brain @ 2014-04-11 21:28 UTC (permalink / raw)
To: pgsql-jdbc
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.
Can I load both drivers in the same application ?
I currently use the Apache database connection pool configured through
Tomcat's context.xml to load the driver and handle the connection pool.
-Jorge
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Is it possible to load two different versions of the JDBC driver in the same application?
2014-04-11 21:28 Is it possible to load two different versions of the JDBC driver in the same application? Tecno Brain <cerebrotecnologico@gmail.com>
@ 2014-04-11 21:32 ` Steven Schlansker <stevenschlansker@gmail.com>
2014-04-11 21:34 ` Re: Is it possible to load two different versions of the JDBC driver in the same application? Tecno Brain <cerebrotecnologico@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Steven Schlansker @ 2014-04-11 21:32 UTC (permalink / raw)
To: Tecno Brain <cerebrotecnologico@gmail.com>; +Cc: pgsql-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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Is it possible to load two different versions of the JDBC driver in the same application?
2014-04-11 21:28 Is it possible to load two different versions of the JDBC driver in the same application? Tecno Brain <cerebrotecnologico@gmail.com>
2014-04-11 21:32 ` Re: Is it possible to load two different versions of the JDBC driver in the same application? Steven Schlansker <stevenschlansker@gmail.com>
@ 2014-04-11 21:34 ` Tecno Brain <cerebrotecnologico@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Tecno Brain @ 2014-04-11 21:34 UTC (permalink / raw)
To: pgsql-jdbc
Because the Amazon Redshift documentation states the following:
"The PostgreSQL 9.x JDBC and ODBC drivers might not work correctly with all
applications when accessing Amazon Redshift. Currently, Amazon Redshift
recommends the following version 8.4 JDBC and ODBC drivers:"
On Fri, Apr 11, 2014 at 2:32 PM, Steven Schlansker <
stevenschlansker@gmail.com> wrote:
>
> 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.
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Is it possible to load two different versions of the JDBC driver in the same application?
2014-04-11 21:28 Is it possible to load two different versions of the JDBC driver in the same application? Tecno Brain <cerebrotecnologico@gmail.com>
@ 2014-04-11 21:32 ` John R Pierce <pierce@hogranch.com>
1 sibling, 0 replies; 4+ messages in thread
From: John R Pierce @ 2014-04-11 21:32 UTC (permalink / raw)
To: pgsql-jdbc
On 4/11/2014 2:28 PM, Tecno Brain 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.
the current JDBC driver works with all versions interchangeably.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2014-04-11 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11 21:28 Is it possible to load two different versions of the JDBC driver in the same application? Tecno Brain <cerebrotecnologico@gmail.com>
2014-04-11 21:32 ` Steven Schlansker <stevenschlansker@gmail.com>
2014-04-11 21:34 ` Tecno Brain <cerebrotecnologico@gmail.com>
2014-04-11 21:32 ` John R Pierce <pierce@hogranch.com>
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