title: custom JDBC driver
body: <p>I am writing my own custom JDBC driver. I am wondering how I can configure the URL prefix to be passed to <code>DriverManager.getConnection</code> in client code (i.e., the equivalent of jdbc:mysql when using mysql connector)? I seem to keep getting <code>java.sql.SQLException: No suitable driver found</code>. My code currently looks like the following:</p>
  
  <pre><code>static
  {
      try
      {
          CustomDriver driverInst = new CustomDriver();
          DriverManager.registerDriver(driverInst);
      }
      catch (Exception e) { e.printStackTrace(); }
  }
  
  public CustomDriver () throws SQLException 
  {
      super();
  }
  
  @Override
  public Connection connect (String url, Properties info) throws SQLException
  {
      // this is never called
      return null;
  }
  </code></pre>
  
  <p>test code:</p>
  
  <pre><code>      Class.forName("CustomDriver");
  
        System.out.println("Connecting to database...");
        conn = DriverManager.getConnection("customDriver://localhost/testdb"); 
        // throws SQLException
  </code></pre>