issue# 2608:stop-ds fails when connection with smtp-server fails
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | import org.opends.messages.Message; |
| | |
| | | Properties properties = new Properties(); |
| | | properties.setProperty(SMTP_PROPERTY_HOST, smtpHost); |
| | | properties.setProperty(SMTP_PROPERTY_PORT, smtpPort); |
| | | properties.setProperty(SMTP_PROPERTY_CONNECTION_TIMEOUT, |
| | | SMTP_DEFAULT_TIMEOUT_VALUE); |
| | | properties.setProperty(SMTP_PROPERTY_IO_TIMEOUT, |
| | | SMTP_DEFAULT_TIMEOUT_VALUE); |
| | | mailServerProperties.add(properties); |
| | | } |
| | | else |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.extensions; |
| | | import org.opends.messages.Message; |
| | |
| | | } |
| | | |
| | | Message msg = WARN_SMTPALERTHANDLER_ERROR_SENDING_MESSAGE.get( |
| | | alertType, alertMessage, stackTraceToSingleLineString(e)); |
| | | alertType, alertMessage, e.getLocalizedMessage()); |
| | | ErrorLogger.logError(msg); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * The name of the JavaMail property that can be used to specify the socket |
| | | * connection timeout value in milliseconds. |
| | | */ |
| | | public static final String SMTP_PROPERTY_CONNECTION_TIMEOUT = |
| | | "mail.smtp.connectiontimeout"; |
| | | |
| | | |
| | | /** |
| | | * The name of the JavaMail property that can be used to specify the socket |
| | | * I/O timeout value in milliseconds. |
| | | */ |
| | | public static final String SMTP_PROPERTY_IO_TIMEOUT = "mail.smtp.timeout"; |
| | | |
| | | |
| | | /** |
| | | * The default timeout value for JavaMail timeout properties. |
| | | */ |
| | | public static final String SMTP_DEFAULT_TIMEOUT_VALUE = "5000"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * The description for the alert type that will be used for the alert |
| | | * notification generated if the multimaster replication detects |
| | | * a conflict that cannot be solved automatically. |