test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/KeepAliveDuringCall.java

Print this page

        

*** 80,98 **** try { UnicastRemoteObject.exportObject(obj); System.err.println("exported shutdown monitor"); ! Registry localRegistry = ! LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT); System.err.println("created local registry"); localRegistry.bind(BINDING, obj); System.err.println("bound shutdown monitor in local registry"); System.err.println("starting remote ShutdownImpl VM..."); ! (new JavaVM("ShutdownImpl")).start(); Shutdown s; synchronized (obj.lock) { System.err.println( "waiting for submission of object to shutdown..."); --- 80,100 ---- try { UnicastRemoteObject.exportObject(obj); System.err.println("exported shutdown monitor"); ! Registry localRegistry = TestLibrary.createRegistryOnUnusedPort(); ! int registryPort = TestLibrary.getRegistryPort(localRegistry); System.err.println("created local registry"); localRegistry.bind(BINDING, obj); System.err.println("bound shutdown monitor in local registry"); System.err.println("starting remote ShutdownImpl VM..."); ! (new JavaVM("ShutdownImpl", ! "-Drmi.registry.port=" + ! registryPort, "")).start(); Shutdown s; synchronized (obj.lock) { System.err.println( "waiting for submission of object to shutdown...");