| | |
| | | |
| | | ArrayList<Backend> backendList = new ArrayList<Backend>(); |
| | | ArrayList<ConfigEntry> entryList = new ArrayList<ConfigEntry>(); |
| | | ArrayList<List<DN>> dnList = new ArrayList<List<DN>>(); |
| | | getBackends(backendList, entryList, dnList); |
| | | ArrayList<List<DN>> dnList = new ArrayList<List<DN>>(); |
| | | int code = getBackends(backendList, entryList, dnList); |
| | | if (code != 0) |
| | | { |
| | | return code; |
| | | } |
| | | |
| | | int numBackends = backendList.size(); |
| | | for (int i=0; i < numBackends; i++) |
| | |
| | | * the backends will be placed. |
| | | * @param dnList A list into which the set of base DNs for each backend |
| | | * will be placed. |
| | | * |
| | | * @return 0 if everything went fine. 1 if an error occurred. |
| | | * |
| | | */ |
| | | private static void getBackends(ArrayList<Backend> backendList, |
| | | private static int getBackends(ArrayList<Backend> backendList, |
| | | ArrayList<ConfigEntry> entryList, |
| | | ArrayList<List<DN>> dnList) |
| | | { |
| | |
| | | String message = getMessage(msgID, DN_BACKEND_BASE, de.getErrorMessage()); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, message, |
| | | msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | stackTraceToSingleLineString(e)); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, message, |
| | | msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | |
| | | ConfigEntry baseEntry = null; |
| | |
| | | String message = getMessage(msgID, DN_BACKEND_BASE, ce.getMessage()); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, message, |
| | | msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | stackTraceToSingleLineString(e)); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, message, |
| | | msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | |
| | | ce.getMessage()); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | stackTraceToSingleLineString(e)); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | |
| | | ce.getMessage()); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | stackTraceToSingleLineString(e)); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | |
| | | Class backendClass = null; |
| | |
| | | stackTraceToSingleLineString(e)); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | |
| | | Backend backend = null; |
| | |
| | | stackTraceToSingleLineString(e)); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | |
| | | stackTraceToSingleLineString(e)); |
| | | logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | System.exit(1); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | |
| | | entryList.add(configEntry); |
| | | dnList.add(baseDNs); |
| | | } |
| | | return 0; |
| | | } |
| | | } |
| | | |