Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WYj3a-0001vY-CD for pgsql-jdbc@arkaria.postgresql.org; Fri, 11 Apr 2014 21:32:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WYj3Z-00051q-Pz for pgsql-jdbc@arkaria.postgresql.org; Fri, 11 Apr 2014 21:32:17 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WYj3Y-000509-4n for pgsql-jdbc@postgresql.org; Fri, 11 Apr 2014 21:32:16 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WYj3V-0006j3-L1 for pgsql-jdbc@postgresql.org; Fri, 11 Apr 2014 21:32:15 +0000 Received: by mail-pa0-f53.google.com with SMTP id ld10so5890656pab.12 for ; Fri, 11 Apr 2014 14:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ZXbG6BTLTdgnDWgV3cRa+POMGjHP8EiE5Yqq5E1qKEw=; b=zXad7sgJ5z+r5jyNx8osJE1VpALD7IJH3ZRIFkJgTJvwxjzIXFIEFs8oirTjj1e6CS 8uI8jOgVFEQJk1CgWUicg+pV7RSClCySDtVd2AiDXSf220KD19qA8gGx/JfU6w4Iy5uY fDGFQQxV6AdkspZsbjb+VACFWvEKgwtiKcz++KX7tBEyo3Zm2yGPfVjjBnMencg1066G S58y2CGjpjsPhDZtvFDrI8jj2HZsHsx2QN1byLe09kMUOyrHuLtEgyVLE6oK6KlCsQCS FTz6YYtQdTYgZUyLHpfj7P0eEc+vaWoHZPQUnOTAO7g7bxHkJUlg1nqsuFOpBxMcAzr8 L5qQ== X-Received: by 10.66.246.229 with SMTP id xz5mr30115603pac.119.1397251933013; Fri, 11 Apr 2014 14:32:13 -0700 (PDT) Received: from [10.10.21.90] (otra.opentable.com. [199.16.144.7]) by mx.google.com with ESMTPSA id q10sm17732384pbl.29.2014.04.11.14.32.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 14:32:12 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: Is it possible to load two different versions of the JDBC driver in the same application? From: Steven Schlansker In-Reply-To: Date: Fri, 11 Apr 2014 14:32:10 -0700 Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <1EB80178-5259-4566-8577-241B20F73E94@gmail.com> References: To: Tecno Brain X-Mailer: Apple Mail (2.1874) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Apr 11, 2014, at 2:28 PM, Tecno Brain wro= te: > I have a Java application that is using Postgres 9.1, and we use the late= st 9.1 JDBC driver. > The same Java app requires access now to a Redshift cluster. Amazon recom= mends to use a Postgres 8 JDBC driver. Why? That=92s ancient! Have you tested that the newer driver does not wor= k? >=20 > Can I load both drivers in the same application ?=20 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=92t 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. --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc