750 if (useSsl || useRegistrySsl) {
751 csf = new SslRMIClientSocketFactory();
752 ssf = createSslRMIServerSocketFactory(
753 sslConfigFileName, enabledCipherSuites,
754 enabledProtocols, sslNeedClientAuth);
755 }
756
757 if (useSsl) {
758 env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE,
759 csf);
760 env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE,
761 ssf);
762 }
763
764 JMXConnectorServer connServer = null;
765 try {
766 connServer =
767 JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
768 connServer.start();
769 } catch (IOException e) {
770 if (connServer == null) {
771 throw new AgentConfigurationError(CONNECTOR_SERVER_IO_ERROR,
772 e, url.toString());
773 } else {
774 throw new AgentConfigurationError(CONNECTOR_SERVER_IO_ERROR,
775 e, connServer.getAddress().toString());
776 }
777 }
778
779 if (useRegistrySsl) {
780 registry =
781 new SingleEntryRegistry(port, csf, ssf,
782 "jmxrmi", exporter.firstExported);
783 } else {
784 registry =
785 new SingleEntryRegistry(port,
786 "jmxrmi", exporter.firstExported);
787 }
788
789
790 int registryPort =
|
750 if (useSsl || useRegistrySsl) {
751 csf = new SslRMIClientSocketFactory();
752 ssf = createSslRMIServerSocketFactory(
753 sslConfigFileName, enabledCipherSuites,
754 enabledProtocols, sslNeedClientAuth);
755 }
756
757 if (useSsl) {
758 env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE,
759 csf);
760 env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE,
761 ssf);
762 }
763
764 JMXConnectorServer connServer = null;
765 try {
766 connServer =
767 JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
768 connServer.start();
769 } catch (IOException e) {
770 if (connServer == null || connServer.getAddress() == null) {
771 throw new AgentConfigurationError(CONNECTOR_SERVER_IO_ERROR,
772 e, url.toString());
773 } else {
774 throw new AgentConfigurationError(CONNECTOR_SERVER_IO_ERROR,
775 e, connServer.getAddress().toString());
776 }
777 }
778
779 if (useRegistrySsl) {
780 registry =
781 new SingleEntryRegistry(port, csf, ssf,
782 "jmxrmi", exporter.firstExported);
783 } else {
784 registry =
785 new SingleEntryRegistry(port,
786 "jmxrmi", exporter.firstExported);
787 }
788
789
790 int registryPort =
|