Package net.sf.atjc.config

Examples of net.sf.atjc.config.ConfigurationException


  public void configure(ServerConfig aConfig) throws ConfigurationException {
    super.configure(aConfig);
    try {
      context = new InitialContext(aConfig.getProperties());
    } catch (NamingException e) {
      throw new ConfigurationException("Unable to initialize naming context." + e.getMessage(), e);
    }
  }
View Full Code Here


    Class<? extends ServerInstance> instanceClass = getInstanceClass(config);
    ServerInstance instance;
    try {
      instance = instanceClass.newInstance();
    } catch (Exception e) {
      throw new ConfigurationException("Failed to create server instance. " + e.getMessage(), e);
    }
    instance.setDestination(aDestination);
    return instance;
  }
View Full Code Here

    URLClassLoader loader = new URLClassLoader(urls, getClass().getClassLoader());
    Class<?> clazz;
    try {
      clazz = Class.forName(aConfig.getServerInstanceClass(), true, loader);
    } catch (ClassNotFoundException e) {
      throw new ConfigurationException(String.format("Class '%s' defined by for server '%s' does not exist.", aConfig.getServerInstanceClass(),
          aConfig.getServerId()), e);
    }
    return clazz.asSubclass(ServerInstance.class);
  }
View Full Code Here

TOP

Related Classes of net.sf.atjc.config.ConfigurationException

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.