Package java.rmi.server

Examples of java.rmi.server.RemoteObject


    @VisibleForTesting
    static HostAndPort getRunningAgentAddress(Integer registryPort, Integer serverPort)
    {
        JMXConnectorServer jmxServer;
        RemoteObject registry;
        int actualRegistryPort;
        try {
            jmxServer = getField(Agent.class, JMXConnectorServer.class, "jmxServer");
            registry = getField(ConnectorBootstrap.class, RemoteObject.class, "registry");

            if (jmxServer == null || registry == null) {
                log.warn("Cannot determine if JMX agent is already running (not an Oracle JVM?). Will try to start it manually.");
                return null;
            }

            actualRegistryPort = ((UnicastRef) registry.getRef()).getLiveRef().getPort();
        }
        catch (Exception e) {
            log.warn(e, "Cannot determine if JMX agent is already running. Will try to start it manually.");
            return null;
        }
View Full Code Here


    @VisibleForTesting
    static HostAndPort getRunningAgentAddress(Integer registryPort, Integer serverPort)
    {
        JMXConnectorServer jmxServer;
        RemoteObject registry;
        int actualRegistryPort;
        try {
            jmxServer = getField(Agent.class, JMXConnectorServer.class, "jmxServer");
            registry = getField(ConnectorBootstrap.class, RemoteObject.class, "registry");

            if (jmxServer == null || registry == null) {
                log.warn("Cannot determine if JMX agent is already running (not an Oracle JVM?). Will try to start it manually.");
                return null;
            }

            actualRegistryPort = ((UnicastRef) registry.getRef()).getLiveRef().getPort();
        }
        catch (Exception e) {
            log.warn(e, "Cannot determine if JMX agent is already running. Will try to start it manually.");
            return null;
        }
View Full Code Here

TOP

Related Classes of java.rmi.server.RemoteObject

Copyright © 2018 www.massapicom. 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.