Examples of DAOConfigurationException


Examples of com.alexnevsky.hotel.dao.exception.DAOConfigurationException

        // URL as DataSource URL and lookup it in the JNDI.
        DataSource dataSource;
        try {
          dataSource = (DataSource) new InitialContext().lookup(JNDI_ROOT + url);
        } catch (NamingException e) {
          throw new DAOConfigurationException("DataSource '" + url + "' is missing in JNDI.", e);
        }
        DataSourceDAOFactory dataSourceDAOFactory = DataSourceDAOFactory.getInstance(dataSource);
        instance = dataSourceDAOFactory;
      } else {
        throw new DAOConfigurationException("Database name is null.");
      }
    }
    return instance;
  }
View Full Code Here

Examples of com.alexnevsky.hotel.dao.exception.DAOConfigurationException

    String fullKey = this.specificKey + "." + key;
    String property = PROPERTIES.getProperty(fullKey);

    if (property == null || property.trim().length() == 0) {
      if (mandatory) {
        throw new DAOConfigurationException("Required property '" + fullKey + "'"
            + " is missing in properties file '" + PROPERTIES_FILE + "'.");
      } else {
        // Make empty value null. Empty Strings are evil.
        property = null;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.