Skip site navigation (1) Skip section navigation (2)

Early JDBC driver load?

From: Jesus Maudes <jmaudes(at)ubu(dot)es>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Early JDBC driver load?
Date: 2009-02-26 00:05:22
Message-ID: 48cb7eaf0902251605k28e1ed66n79baede3781cf31f@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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(dot)jdbc(dot)odbc(dot)JdbcOdbcDriver(at)3cb89838
org(dot)postgresql(dot)Driver(at)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

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2009-02-26 00:11:50
Subject: Re: ResultSetMetaData.getColumnDisplaySize returns 2147483647 ?
Previous:From: Kris JurkaDate: 2009-02-25 23:58:13
Subject: Re: Why driver does not need to be registered?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group