Package com.caucho.sql

Examples of com.caucho.sql.DriverConfig


    Class<?> driverClass = getDriverClass();
   
    DBPool pool = new DBPool();
    pool.setName(getName());
   
    DriverConfig driver = pool.createDriver();
    driver.setType(driverClass);
   
    ConfigType<?> configType = TypeFactory.getType(driverClass);

    if (getUrl() != null) {
      if (configType.getAttribute(URL) != null
          || Driver.class.isAssignableFrom(driverClass)) {
        driver.setURL(getUrl());
      }
    }

    if (getDatabaseName() != null) {
      driver.setProperty("database-name", getDatabaseName());
    }
   
    if (getUser() != null)
      driver.setUser(getUser());
   
    if (getPassword() != null)
      driver.setPassword(getPassword());
   
    try {
      driver.init();
     
      pool.init();
    } catch (Exception e) {
      e.printStackTrace();
      throw ConfigException.create(e);
View Full Code Here

TOP

Related Classes of com.caucho.sql.DriverConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.