| | |
| | | import org.opends.quicksetup.installer.ui.ServerSettingsPanel; |
| | | import org.opends.quicksetup.installer.ui.SuffixesToReplicatePanel; |
| | | import org.opends.server.util.SetupUtils; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean isSubStep(WizardStep step) |
| | | { |
| | | return SUBSTEPS.contains(step); |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (ctx != null) |
| | | { |
| | | try |
| | | { |
| | | ctx.close(); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | } |
| | | StaticUtils.close(ctx); |
| | | } |
| | | } |
| | | InstallerHelper helper = new InstallerHelper(); |
| | |
| | | { |
| | | notifyListeners(getFormattedError(ae, true)); |
| | | } |
| | | if (ctx != null) |
| | | { |
| | | try |
| | | { |
| | | ctx.close(); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | } |
| | | StaticUtils.close(ctx); |
| | | notifyListeners(getFormattedDoneWithLineBreak()); |
| | | } |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | try |
| | | { |
| | | if (ctx != null) |
| | | { |
| | | ctx.close(); |
| | | } |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.close(ctx); |
| | | } |
| | | |
| | | notifyListeners(getFormattedDoneWithLineBreak()); |
| | |
| | | } |
| | | finally |
| | | { |
| | | try |
| | | { |
| | | if (ctx != null) |
| | | { |
| | | ctx.close(); |
| | | } |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.close(ctx); |
| | | } |
| | | notifyListeners(getFormattedDoneWithLineBreak()); |
| | | checkAbort(); |
| | |
| | | |
| | | hmConfiguredRemoteReplication.put(server, repl); |
| | | |
| | | try |
| | | { |
| | | ctx.close(); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.close(ctx); |
| | | notifyListeners(getFormattedDoneWithLineBreak()); |
| | | checkAbort(); |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | try |
| | | { |
| | | if (writer != null) |
| | | { |
| | | writer.close(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.close(writer); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | Message failedMsg = |
| | | getThrowableMsg(INFO_ERROR_CONNECTING_TO_LOCAL.get(), t); |
| | | try |
| | | { |
| | | if (ctx != null) |
| | | { |
| | | ctx.close(); |
| | | } |
| | | } |
| | | catch (Throwable t1) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.close(ctx); |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, failedMsg, t); |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | try{ rCtx.close(); } |
| | | catch (Throwable t){ /* do nothing */ } |
| | | StaticUtils.close(rCtx); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | try |
| | | { |
| | | rCtx.close(); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.close(rCtx); |
| | | } |
| | | } |
| | | if (replicationId == -1) |
| | |
| | | ReturnCode.APPLICATION_ERROR, |
| | | ERR_COULD_NOT_FIND_REPLICATIONID.get(dn), null); |
| | | } |
| | | try |
| | | { |
| | | Thread.sleep(3000); |
| | | } |
| | | catch (Throwable t) { /* do nothing */ } |
| | | StaticUtils.sleep(3000); |
| | | int nTries = 5; |
| | | boolean initDone = false; |
| | | while (!initDone) |
| | |
| | | ReturnCode.APPLICATION_ERROR, |
| | | pnfe.getMessageObject(), null); |
| | | } |
| | | try |
| | | { |
| | | Thread.sleep((5 - nTries) * 3000); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.sleep((5 - nTries) * 3000); |
| | | } |
| | | nTries--; |
| | | } |
| | | } |
| | | catch (ApplicationException ae) |
| | | { |
| | | try |
| | | { |
| | | if (ctx != null) |
| | | { |
| | | ctx.close(); |
| | | } |
| | | } |
| | | catch (Throwable t1) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.close(ctx); |
| | | throw ae; |
| | | } |
| | | if ((isADS || isSchema) && isVerbose()) |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (null != remoteCtx) |
| | | try { remoteCtx.close(); } |
| | | catch (NamingException x){ /* do nothing */ } |
| | | if (null != localCtx) |
| | | try { localCtx.close(); } |
| | | catch (NamingException x){ /* do nothing */ } |
| | | StaticUtils.close(remoteCtx, localCtx); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (ctx != null) |
| | | { |
| | | try |
| | | { |
| | | ctx.close(); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | } |
| | | StaticUtils.close(ctx); |
| | | } |
| | | } |
| | | |
| | |
| | | // server will receive a connect error. |
| | | checkAbort(); |
| | | } |
| | | try |
| | | { |
| | | Thread.sleep(500); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.sleep(500); |
| | | if (canceled) |
| | | { |
| | | // TODO: we should try to cleanly abort the initialize. As we have |
| | |
| | | String lastLogMsg = null; |
| | | while (!isOver) |
| | | { |
| | | try |
| | | { |
| | | Thread.sleep(500); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.sleep(500); |
| | | try |
| | | { |
| | | NamingEnumeration<SearchResult> res = |
| | |
| | | } |
| | | else |
| | | { |
| | | try |
| | | { |
| | | Thread.sleep(100); |
| | | } |
| | | catch (Throwable t) |
| | | { /* do nothing */ |
| | | } |
| | | StaticUtils.sleep(100); |
| | | } |
| | | } |
| | | if (thread.getException() != null) |