}
protected Connection JDBCLogin() throws ConfigurationManagerException {
if(jdbcurl == null) {
ErrorReporter.getErrorHandler().reportError("JDBC URL is <null>. Check jconfig.properties for org.jconfig.jdbc.url.");
throw new ConfigurationManagerException("JDBC URL is <null>. Check jconfig.properties for org.jconfig.jdbc.url.");
}
if(user == null) {
ErrorReporter.getErrorHandler().reportError("JDBC USER is <null>. Check jconfig.properties for org.jconfig.jdbc.user.");
throw new ConfigurationManagerException("JDBC USER is <null>. Check jconfig.properties for org.jconfig.jdbc.user.");
}
if(pwd == null) {
ErrorReporter.getErrorHandler().reportError("JDBC PASSWORD is <null>. Check jconfig.properties for org.jconfig.jdbc.pwd");
throw new ConfigurationManagerException("JDBC PASSWORD is <null>. Check jconfig.properties for org.jconfig.jdbc.pwd.");
}
try {
return DriverManager.getConnection(jdbcurl, user, pwd);
} catch (SQLException e) {
ErrorReporter.getErrorHandler().reportError("Problem getting JDBC Connection",e);
throw new ConfigurationManagerException("Problem getting JDBC Connection: " + e.getMessage());
}
}