Package com.caucho.config.type

Examples of com.caucho.config.type.ConfigType


    else {
      throw new SQLExceptionWrapper(L.l("driver '{0}' has not been configured for pool {1}.  <database> needs either a <data-source> or a <type>.",
                                        _driverClass, getDBPool().getName()));
    }

    ConfigType configType = TypeFactory.getType(driverObject);

    // server/14g1
    if (_driverURL != null) {
      if (! configType.setProperty(driverObject, URL, _driverURL)) {
  if (! (driverObject instanceof Driver)) {
    throw new ConfigException(L.l("database: 'url' is an unknown property of '{0}'",
          driverObject.getClass().getName()));
  }
      }
    }
   
    if (_user != null) {
      if (! configType.setProperty(driverObject, USER, _user)) {
  if (! (driverObject instanceof Driver)) {
    throw new ConfigException(L.l("database: 'user' is an unknown property of '{0}'",
          driverObject.getClass().getName()));
  }
      }
    }
   
    if (_password != null) {
      if (! configType.setProperty(driverObject, PASSWORD, _password)) {
  if (! (driverObject instanceof Driver)) {
    throw new ConfigException(L.l("database: 'password' is an unknown property of '{0}'",
          driverObject.getClass().getName()));
  }
      }
View Full Code Here


  public static void init(Object bean)
    throws ConfigException
  {
    try {
      ConfigType type = TypeFactory.getType(bean.getClass());

      type.init(bean);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

  public static void inject(Object bean)
    throws ConfigException
  {
    try {
      ConfigType type = TypeFactory.getType(bean.getClass());

      type.inject(bean);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

    }
  }

  public static Object replaceObject(Object bean) throws Exception
  {
    ConfigType type = TypeFactory.getType(bean.getClass());

    return type.replaceObject(bean);
  }
View Full Code Here

TOP

Related Classes of com.caucho.config.type.ConfigType

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.