private void exportAsRMI() throws Exception {
        String appHost = System.getProperty("app.host");
        String appPort = System.getProperty("app.port");
        RmiServiceExporter exporter = new RmiServiceExporter();
        exporter.setServiceInterface(Executable.class);
        String serviceName = getAppName() + "Launcher";
        //exporter.setRegistryHost(appHost);
        exporter.setRegistryPort(Integer.valueOf(appPort));
        exporter.setServiceName(serviceName);
        exporter.setService(this);
        exporter.afterPropertiesSet();

        String serviceUrl = String.format("rmi://%s:%s/%s", appHost, appPort, serviceName);
        logger.info(banner("Export Executable Service at {}", serviceUrl));
    }
private void exportAsRMI() throws Exception {
        String appHost = System.getProperty("app.host");
        String appPort = System.getProperty("app.port");
        RmiServiceExporter exporter = new RmiServiceExporter();
        exporter.setServiceInterface(Executable.class);
        String serviceName = getAppName() + "Launcher";
        
        exporter.setRegistryPort(Integer.valueOf(appPort));
        exporter.setServiceName(serviceName);
        exporter.setService(this);
        exporter.afterPropertiesSet();

        String serviceUrl = String.format("rmi:
        logger.info(banner("Export Executable Service at {}", serviceUrl));
    }
private void exportAsRMI ( ) throws Exception { String appHost = System . getProperty ( "app.host" ) ; String appPort = System . getProperty ( "app.port" ) ; RmiServiceExporter exporter = new RmiServiceExporter ( ) ; exporter . setServiceInterface ( Executable . class ) ; String serviceName = getAppName ( ) + "Launcher" ; //exporter.setRegistryHost(appHost); exporter . setRegistryPort ( Integer . valueOf ( appPort ) ) ; exporter . setServiceName ( serviceName ) ; exporter . setService ( this ) ; exporter . afterPropertiesSet ( ) ; String serviceUrl = String . format ( "rmi://%s:%s/%s" , appHost , appPort , serviceName ) ; logger . info ( banner ( "Export Executable Service at {}" , serviceUrl ) ) ; }
将本对象通过Spring的RMI机制暴露出去

@throws Exception
将本对象通过Spring的RMI机制暴露出去