1 2 12 package com.versant.core.jdo; 13 14 17 public class DriverUtils { 18 19 private static String [] drivers = new String []{ 20 "com.intersys.jdbc.CacheDriver", 21 "jdbc:Cache://host:port/database_name", 22 "cache", 23 null, 24 "com.ibm.db2.jcc.DB2Driver", 25 "jdbc:db2://host:port/database_name", 26 "db2", 27 "driverType=4", 28 "org.firebirdsql.jdbc.FBDriver", 29 "jdbc:firebirdsql://host/path/to/database.gdb", 30 "firebird", 31 null, 32 "org.hsqldb.jdbcDriver", 33 "jdbc:hsqldb:hsql://host/database_name", 34 "hypersonic", 35 null, 36 "com.informix.jdbc.IfxDriver", 37 "jdbc:informix-sqli:host:port/database_name", 38 "informix", 39 "INFORMIXSERVER=ifmxserver_tcp", 40 "com.informix.jdbc.IfxDriver", 41 "jdbc:informix-sqli:host:port/database_path", 42 "informixse", 43 "INFORMIXSERVER=server_name", 44 "interbase.interclient.Driver", 45 "jdbc:interbase://host/path/to/database.gdb", 46 "interbase", 47 null, 48 "com.microsoft.jdbc.sqlserver.SQLServerDriver", 49 "jdbc:microsoft:sqlserver://host:port", 50 "mssql", 51 "DatabaseName=database_name;SelectMethod=cursor", 52 "com.mysql.jdbc.Driver", 53 "jdbc:mysql://host:port/database_name", 54 "mysql", 55 null, 56 "oracle.jdbc.driver.OracleDriver", 57 "jdbc:oracle:thin:@host:port:database_name", 58 "oracle", 59 null, 60 "com.pointbase.jdbc.jdbcUniversalDriver", 61 "jdbc:pointbase:server://host/database_name", 62 "pointbase", 63 null, 64 "org.postgresql.Driver", 65 "jdbc:postgresql://host/database_name", 66 "postgres", 67 null, 68 "com.sap.dbtech.jdbc.DriverSapDB", 69 "jdbc:sapdb://host/database_name", 70 "sapdb", 71 null, 72 "com.sybase.jdbc2.jdbc.SybDriver", 73 "jdbc:sybase:Tds:host:port/database_name", 74 "sybase", 75 null, 76 "[no driver required]", 77 "versant:database[@hostname][:portno]", 78 "versant", 79 null, 80 }; 81 82 public static void addDriver(String database, String jdoDriver, String driverClass, 83 String urlPrefix, String sampleURL, String properties) { 84 int length = drivers.length; 85 String [] newList = new String [length + 5]; 86 System.arraycopy(drivers, 0, newList, 5, length); 87 drivers[0] = database; 88 drivers[1] = database; 89 drivers[2] = database; 90 drivers[3] = database; 91 drivers[4] = database; 92 drivers[5] = database; 93 } 94 } 95 | Popular Tags |