Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D96EE633A62 for ; Wed, 25 Feb 2009 19:58:22 -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 05750-02 for ; Wed, 25 Feb 2009 19:58:17 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail.postgresql.org (Postfix) with ESMTP id 1014F63339A for ; Wed, 25 Feb 2009 19:58:16 -0400 (AST) Received: by leary.csoft.net (Postfix, from userid 1112) id 0AA7BACA8; Wed, 25 Feb 2009 18:58:13 -0500 (EST) Date: Wed, 25 Feb 2009 18:58:13 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Jesus Maudes cc: pgsql-jdbc@postgresql.org Subject: Re: Why driver does not need to be registered? In-Reply-To: <48cb7eaf0902251551w3fddb89bvd81bf0bada7cbc7@mail.gmail.com> Message-ID: References: <48cb7eaf0902251551w3fddb89bvd81bf0bada7cbc7@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200902/45 X-Sequence-Number: 19320 On Thu, 26 Feb 2009, Jesus Maudes wrote: > [Why does the driver show up even though I didn't register it?] > The JDBC4 spec included with the 1.6 JVM includes autoloading functionality by including a special file in the driver's jar file. Section 9.2.1 of the JDBC4 spec says: The DriverManager.getConnection method has been enhanced to support the Java Standard Edition Service Provider mechanism. JDBC 4.0 Drivers must include the file META-INF/services/java.sql.Driver. This file contains the name of the JDBC driver's implementation of java.sql.Driver. So the JVM will scan the jars available and look for this special file and load the driver specified in it automatically. Kris Jurka