Package org.apache.uima.ducc.common.exception

Examples of org.apache.uima.ducc.common.exception.DuccComponentInitializationException


   * @throws DuccComponentInitializationException - if no components provided for loading
   */
  private Class<?>[] getComponentsToLoad() throws Exception {
    String[] componentsToLoad = System.getProperty(DUCC_DEPLOY_COMPONENTS).split(",");
    if ( componentsToLoad == null || componentsToLoad.length == 0 ) {
      throw new DuccComponentInitializationException("Ducc Component not specified. Provide Ducc Component(s) to Load via -D"+DUCC_DEPLOY_COMPONENTS+" System property");
    }
    List<Class<?>> components = new ArrayList<Class<?>>();
    for( String componentToLoad : componentsToLoad ) {
      String configurationClassName = System.getProperty("ducc."+componentToLoad+".configuration.class");
      exitIfInvalid(componentToLoad, configurationClassName, "Configuration Class Name");
View Full Code Here


    for (Map.Entry<Object, Object> entry : System.getProperties().entrySet()) {
      if (((String) entry.getKey()).endsWith("endpoint")) {
        String endpointValue = (String) entry.getValue();
        String endpointType = (String) System.getProperty((String) entry.getKey() + ".type");
        if (endpointType == null) {
          throw new DuccComponentInitializationException(
                  "Endpoint type not specified in component properties. Specify vm, queue, or topic type value for endpoint: "
                          + endpointValue);
        } else if (endpointType.equals("vm")) {
          endpointValue = "vm:" + endpointValue;
          System.setProperty((String) entry.getKey(), endpointValue);
        } else if (endpointType.equals("topic") || endpointType.equals("queue")) {
          endpointValue = "activemq:" + endpointType + ":" + endpointValue;
          System.setProperty((String) entry.getKey(), endpointValue);
        } else if (endpointType.equals("socket")) {
          System.setProperty((String) entry.getKey(), "mina:tcp://localhost:");
        } else {
          throw new DuccComponentInitializationException("Provided Endpoint type is invalid:"
                  + endpointType + ". Specify vm, queue, or topic type value for endpoint: "
                  + endpointValue);
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.common.exception.DuccComponentInitializationException

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.