Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 18EC863339A for ; Wed, 25 Feb 2009 20:05:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 11922-05 for ; Wed, 25 Feb 2009 20:05:24 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mail.postgresql.org (Postfix) with ESMTP id 5756D63328D for ; Wed, 25 Feb 2009 20:05:24 -0400 (AST) Received: by yw-out-2324.google.com with SMTP id 5so200182ywh.73 for ; Wed, 25 Feb 2009 16:05:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=IWqmAlZZSXmyPlTG5lsj3nSHKfxNvmKnDDk04ZAuksg=; b=rMmQDSRxeLRFjKQXlnwQAhulhV8uza7vI9gqOwjTa9ce9gOWsNs0xURNFXwpERSyAy Wetji3VI0n+/xzW48vWYurWvnrNwXdPIe9vdvFJC9/4QDkrQTM5WmgU1XYgbxGlPZmi4 ecnfWPFIDVnZkDsD1sEa1lt+gSMTozmPjYM+0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=xx8DtqkRo/LIyrKpn8U52KJwNzOMG42CfFrQjTW8TzNLJgqAVBVMq65IWZ26rzbPb+ dYPVPg5tDYdRhxPjQJt2dV4jNDmfjiTzZdhEBPw4r43/Uju1hHYYBMQRhyeuNZkdeq7V vq8zuWyO7Wgvq6AQ07Ov83nr+I5mZr4yjgELw= MIME-Version: 1.0 Received: by 10.231.16.74 with SMTP id n10mr1006067iba.44.1235606722365; Wed, 25 Feb 2009 16:05:22 -0800 (PST) Date: Thu, 26 Feb 2009 01:05:22 +0100 X-Google-Sender-Auth: 114a32aa58f60de3 Message-ID: <48cb7eaf0902251605k28e1ed66n79baede3781cf31f@mail.gmail.com> Subject: Early JDBC driver load? From: Jesus Maudes To: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=000325574d7ac4c8280463c71b66 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200902/46 X-Sequence-Number: 19321 --000325574d7ac4c8280463c71b66 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi I'm using postgresql-8.3-604.jdbc3.jar driver I have a very simple java program to inspect what drivers are initially loaded: import java.sql.DriverManager; public class ListDrivers { java.util.Enumeration myDrivers = DriverManager.getDrivers(); while (myDrivers.hasMoreElements()){ System.out.println(myDrivers.nextElement()); } } } When I run it using: java -cp .;postgresql-8.3-604.jdbc3.jar ListDrivers It returns sun.jdbc.odbc.JdbcOdbcDriver@3cb89838 org.postgresql.Driver@b815859 Note that I have not loaded the driver using the typical classForName neither the java -Djdbc option Why postgres driver is loaded only by including the jar file in the classpath? Thanks Jesus --000325574d7ac4c8280463c71b66 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi

I'm using postgresql-8.3-604.jdbc3.jar driver

I have a= very simple java program to inspect what drivers are initially loaded:
=
import java.sql.DriverManager;

public class ListDrivers {
=A0=A0=A0
=A0=A0=A0=A0=A0=A0=A0 java.util.Enumeration myDrivers =3D Dri= verManager.getDrivers();
=A0 =A0=A0 =A0=A0 while (myDrivers.hasMoreEleme= nts()){
=A0=A0=A0 =A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 System.out.println(myDrivers.nextElement());
=A0=A0 =A0 =A0 =A0=A0 }=A0=A0=A0=A0=A0=A0=A0
=A0=A0=A0 }=A0=A0=A0
}=

When I run it using:

java -cp .;postgresql-8.3-604.jdbc3.jar= ListDrivers

It returns

sun.jdbc.odbc.JdbcOdbcDriver@3cb89838=
org.postgresql.Driver@b815859

Note that I have not loaded the driver using the typical classForName n= either the java -Djdbc option

Why postgres driver is loaded only by = including the jar file in the classpath?

Thanks

Jesus


--000325574d7ac4c8280463c71b66--