Examples of JMXConnectorServer


Examples of javax.management.remote.JMXConnectorServer

        }
    }

    public void stop() throws IOException {
        if (started.compareAndSet(true, false)) {
            JMXConnectorServer server = connectorServer;
            connectorServer = null;
            if (server != null) {
                try {
                    server.stop();
                } catch (IOException e) {
                    LOG.warn("Failed to stop jmx connector: " + e.getMessage());
                }
                try {
                    getMBeanServer().invoke(namingServiceObjectName, "stop", null, null);
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

                }
                Thread t = new Thread("JMX connector") {
                    @Override
                    public void run() {
                        try {
                            JMXConnectorServer server = connectorServer;
                            if (started.get() && server != null) {
                                LOG.debug("Starting JMXConnectorServer...");
                                connectorStarting.set(true);
                                try {
                                  server.start();
                                } finally {
                                  connectorStarting.set(false);
                                }
                                LOG.info("JMX consoles can connect to " + server.getAddress());
                            }
                        } catch (IOException e) {
                            LOG.warn("Failed to start jmx connector: " + e.getMessage());
                            LOG.debug("Reason for failed jms connector start", e);
                        }
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

                        mbeanServer.unregisterMBean(name);
                   
                }
            }
            registeredMBeanNames.clear();
            JMXConnectorServer server = connectorServer;
            connectorServer = null;
            if (server != null) {
                try {
                  if (!connectorStarting.get()) {
                    server.stop();
                  }
                } catch (IOException e) {
                    LOG.warn("Failed to stop jmx connector: " + e.getMessage());
                }
                try {
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

  {
    LocateRegistry.createRegistry(Integer.parseInt(getProperty("registry_port")));
    // Get the platform MBeanServer
    this.mbs = ManagementFactory.getPlatformMBeanServer();
    JMXServiceURL url = new JMXServiceURL(getProperty("url"));
    JMXConnectorServer connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, this.mbs);
    connectorServer.start();
    this.obn = new ObjectName(getProperty("object_name"));
    // Uniquely identify the MBeans and register them with the platform
    this.mbs.registerMBean(this.ssm, this.obn);
    getService().getLogger().logInfo("Bound JMX to " + url, null, null);
    super.start();
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

        {
            context.close();
        }
       
        // create the JMXCconnectorServer
        final JMXConnectorServer _connectorServer =
            JMXConnectorServerFactory.newJMXConnectorServer(_serviceURL, _environment, mbeanServer_);

        // register the JMXConnectorServer in the MBeanServer
        final ObjectName _connectorServerName = ObjectName.getInstance("connectors:protocol=iiop");
        mbeanServer_.registerMBean(_connectorServer, _connectorServerName);

        _connectorServer.start();

        connectors_.add(_connectorServerName);
    }
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

                } catch (Throwable ignore) {
                }
                Thread t = new Thread("JMX connector") {
                    public void run() {
                        try {
                            JMXConnectorServer server = connectorServer;
                            if (started.get() && server != null) {
                                server.start();
                                LOG.info("JMX consoles can connect to " + server.getAddress());
                            }
                        } catch (IOException e) {
                            LOG.warn("Failed to start jmx connector: " + e.getMessage());
                        }
                    }
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

        }
    }

    public void stop() throws IOException {
        if (started.compareAndSet(true, false)) {
            JMXConnectorServer server = connectorServer;
            connectorServer = null;
            if (server != null) {
                try {
                    server.stop();
                } catch (IOException e) {
                    LOG.warn("Failed to stop jmx connector: " + e.getMessage());
                }
                try {
                    getMBeanServer().invoke(namingServiceObjectName, "stop", null, null);
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

                    : "\n\t" + Agent.getText("jmxremote.ConnectorBootstrap.initialize.noAuthentication")) + (useAuthentication ? ("\n\t" + PropertyNames.ACCESS_FILE_NAME + "=" + accessFileName)
                    : "") + "");
        }

        final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        JMXConnectorServer cs = null;
        try {
            cs = exportMBeanServer(mbs, serverPort, useSsl, useRegistrySsl,
                    enabledCipherSuitesList, enabledProtocolsList,
                    sslNeedClientAuth, useAuthentication,
                    loginConfigName, passwordFileName, accessFileName);

            final JMXServiceURL url = cs.getAddress();
            if (log.isLoggable(Level.FINE)) {
                log.log(Level.FINE, "initialize", Agent.getText(
                        "jmxremote.ConnectorBootstrap.initialize.ready",
                        new JMXServiceURL(url.getProtocol(), url.getHost(),
                        url.getPort(), "/jndi/rmi://" + url.getHost() + ":" + serverPort + "/" + "jmxrmi").toString()));
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

        }

        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        try {
            JMXServiceURL url = new JMXServiceURL("rmi", localhost, 0);
            JMXConnectorServer server = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
            server.start();
            return server;
        } catch (Exception e) {
            throw new AgentConfigurationError(AGENT_EXCEPTION, e, e.toString());
        }
    }
View Full Code Here

Examples of javax.management.remote.JMXConnectorServer

            env.put(
                    RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE,
                    ssf);
        }

        JMXConnectorServer connServer = null;
        try {
            connServer = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
            connServer.start();
        } catch (IOException e) {
            if (connServer == null) {
                throw new AgentConfigurationError(
                        CONNECTOR_SERVER_IO_ERROR, e, url.toString());
            } else {
                throw new AgentConfigurationError(
                        CONNECTOR_SERVER_IO_ERROR, e, connServer.getAddress().toString());
            }
        }

        if (useRegistrySsl) {
            if (registry == null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.