private static String toString(final JmxConnector c) { return "JmxConnector config: { name = " + c.getName() + ", Protocol = " + c.getProtocol() + ", Address = " + c.getAddress() + ", Port = " + c.getPort() + ", AcceptAll = " + c.getAcceptAll() + ", AuthRealmName = " + c.getAuthRealmName() + ", SecurityEnabled = " + c.getSecurityEnabled() + "}"; }
private Ssl writeableJmxSSL() throws TransactionFailure, PropertyVetoException { if (jmxConnectorSsl_w == null) { final JmxConnector jmxC_w = writeableJmxConnector(); if (jmxC_w == null) { return null; } Ssl jmxConnectorSsl = jmxC_w.getSsl(); if (jmxConnectorSsl == null) { jmxConnectorSsl = jmxC_w.createChild(Ssl.class); jmxC_w.setSsl(jmxConnectorSsl); jmxConnectorSsl_w = jmxConnectorSsl; } else { jmxConnectorSsl_w = t.enroll(jmxConnectorSsl); } } return jmxConnectorSsl_w; } private Protocols writableProtocols() throws TransactionFailure {
@Override public Object run(JmxConnector param) throws PropertyVetoException, TransactionFailure { Ssl newSsl = param.createChild(Ssl.class); populateSslElement(newSsl); param.setSsl(newSsl); return newSsl; } }, jmxConnector);
JMX_LOGGER.log(Level.FINE, "Starting JMXConnector: {0}", toString(connConfig)); final String protocol = connConfig.getProtocol(); final String address = connConfig.getAddress(); final int port = Integer.parseInt(connConfig.getPort()); final boolean securityEnabled = Boolean.parseBoolean(connConfig.getSecurityEnabled()); final Ssl ssl = connConfig.getSsl(); connObjectName = new ObjectName(JMX_CONNECTOR_SERVER_PREFIX + ",protocol=" + protocol + ",name=" + connConfig.getName()); mMBeanServer.registerMBean(server, connObjectName).getObjectName(); } catch (final Exception e) {
public void run() { synchronized (service.lock) { for (final JmxConnector c : mConfiguredConnectors) { if (!Boolean.parseBoolean(c.getEnabled())) { JMX_LOGGER.log(Level.INFO, JMX_STARTED_SERVICE_DISABLED, c.getName()); continue; } try { final JMXConnectorServer server = startConnector(c); mConnectorServers.add(server); } catch (final Throwable t) { JMX_LOGGER.log(Level.WARNING, JMX_CANNOT_START_CONNECTOR, new Object[]{toString(c), t}); t.printStackTrace(); } } service.jmxConnectorstatus = JMXConnectorStatus.STARTED; service.lock.notifyAll(); } } }
public static JmxConnector getSystemJmxConnector(AdminService as) { List<JmxConnector> connectors = as.getJmxConnector(); for (JmxConnector connector : connectors) { if (as.getSystemJmxConnectorName().equals(connector.getName())) { return connector; } } return null; }
String realm = as.getSystemJmxConnector().getAuthRealmName(); //yes, for backward compatibility; if (realm == null) realm = as.getAuthRealmName();
AdminService service = config.getAdminService(); for( JmxConnector jmxConnector : service.getJmxConnector()){ Ssl sslElement = jmxConnector.getSsl(); if(sslElement != null) { try {
JmxConnector jc = na.getJmxConnector(); if (jc != null){ List<Property> agentProp =jc.getProperty(); //get the properties and see if host name is specified for ( Property p : agentProp) { String name = p.getName();
public Object run(JmxConnector param) throws PropertyVetoException { param.setSsl(null); return null; } }, jmxConnector);
/** * Returns if the SystemJMXConnector is secure or not * * @param instance * @return */ public boolean isSecureJMX(String instance) { String isSecure = "false"; if (domain.getServerNamed(instance) != null) { if (domain.getServerNamed(instance).getConfig().getAdminService().getSystemJmxConnector() != null) { isSecure = domain.getServerNamed(instance).getConfig().getAdminService().getSystemJmxConnector().getSecurityEnabled(); } } return Boolean.parseBoolean(isSecure); } }
JmxConnector jmxConnector = null; for (JmxConnector listener : config.getAdminService().getJmxConnector()) { if (listener.getName().equals(listenerId)) { jmxConnector = listener; if (jmxConnector.getSsl() == null) { report.setMessage(localStrings.getLocalString( "delete.ssl.element.doesnotexist", "Ssl element does " +
public static JmxConnector getSystemJmxConnector(AdminService as) { List<JmxConnector> connectors = as.getJmxConnector(); for (JmxConnector connector : connectors) { if (as.getSystemJmxConnectorName().equals(connector.getName())) { return connector; } } return null; }
String realm = as.getSystemJmxConnector().getAuthRealmName(); //yes, for backward compatibility; if (realm == null) realm = as.getAuthRealmName();
JmxConnector jc = na.getJmxConnector(); if (jc != null){ List<Property> agentProp =jc.getProperty(); //get the properties and see if host name is specified for ( Property p : agentProp) { String name = p.getName();