| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.protocols.jmx; |
| | | |
| | |
| | | private String jmxRmiConnectorNoClientCertificateName; |
| | | |
| | | /** |
| | | * The name of the JMX connector with SSL client |
| | | * authentication. |
| | | */ |
| | | private String jmxRmiConnectorClientCertificateName; |
| | | |
| | | /** |
| | | * The reference to the JMX connector client with no SSL client |
| | | * authentication. |
| | | */ |
| | |
| | | |
| | | jmxRmiConnectorNoClientCertificateName = baseName + "," |
| | | + "Type=jmxRmiConnectorNoClientCertificateName"; |
| | | |
| | | jmxRmiConnectorClientCertificateName = baseName + "," |
| | | + "Type=jmxRmiConnectorClientCertificateName"; |
| | | } |
| | | |
| | | // =================================================================== |
| | |
| | | * client connections. It may or may not disconnect existing client |
| | | * connections based on the provided flag. |
| | | * |
| | | * @param closeConnections |
| | | * Indicates whether any established client connections |
| | | * associated with the connection handler should also be |
| | | * closed. |
| | | * @param stopRegistry Indicates if the RMI registry should be stopped |
| | | */ |
| | | public void finalizeConnectionHandler( |
| | | boolean closeConnections, boolean stopRegistry) |
| | | public void finalizeConnectionHandler(boolean stopRegistry) |
| | | { |
| | | if (closeConnections) |
| | | try |
| | | { |
| | | try |
| | | if (jmxRmiConnectorNoClientCertificate != null) |
| | | { |
| | | if (jmxRmiConnectorNoClientCertificate != null) |
| | | { |
| | | jmxRmiConnectorNoClientCertificate.stop(); |
| | | } |
| | | if (jmxRmiConnectorClientCertificate != null) |
| | | { |
| | | jmxRmiConnectorClientCertificate.stop(); |
| | | } |
| | | jmxRmiConnectorNoClientCertificate.stop(); |
| | | } |
| | | catch (Exception e) |
| | | if (jmxRmiConnectorClientCertificate != null) |
| | | { |
| | | jmxRmiConnectorClientCertificate.stop(); |
| | | } |
| | | jmxRmiConnectorNoClientCertificate = null; |
| | | jmxRmiConnectorClientCertificate = null; |
| | | } |
| | | else |
| | | catch (Exception e) |
| | | { |
| | | rmiAuthenticator.setFinalizedPhase(true); |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | jmxRmiConnectorNoClientCertificate = null; |
| | | jmxRmiConnectorClientCertificate = null; |
| | | |
| | | // |
| | | // Unregister connectors and stop them. |
| | | try |