initialize();
log.info("trying to connect to setting service...");
/* Attempt to get current data server settings */
DDF_Settings settings = null;
try {
settings = DDF_SettingsService.newSettings(username, password);
if (!settings.isValidLogin()) {
log.error("Posting SETTINGS_RETRIEVAL_FAILURE");
postEvent(DDF_FeedEvent.SETTINGS_RETRIEVAL_FAILURE);
isLoggingIn = false;
return;
}
} catch (final Exception e) {
log.error("Posting SETTINGS_RETRIEVAL_FAILURE");
postEvent(DDF_FeedEvent.SETTINGS_RETRIEVAL_FAILURE);
isLoggingIn = false;
return;
}
log.info("received settings from settings service\n{}", settings);
final DDF_Server server = settings.getServer(serverType);
final String primary = server.getPrimary();
final String secondary = server.getSecondary();
log.info("trying primary server login " + primary);