test/java/rmi/server/Unreferenced/unreferencedContext/UnreferencedContext.java

Print this page

        

*** 39,48 **** --- 39,49 ---- * @author Laird Dornin * * @library ../../../testlibrary * @build UnreferencedContext * @build UnreferencedContext_Stub + * @build TestLibrary * @run main/othervm/timeout=120 UnreferencedContext */ import java.net.*; import java.rmi.*;
*** 117,130 **** intendedContext); UnicastRemoteObject.exportObject(obj); System.err.println("exported remote object"); ! LocateRegistry.createRegistry(TestLibrary.REGISTRY_PORT); System.err.println("created registry"); ! Registry registry = LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT); registry.bind(BINDING, obj); System.err.println("bound remote object in registry"); synchronized (obj.lock) { registry.unbind(BINDING); --- 118,132 ---- intendedContext); UnicastRemoteObject.exportObject(obj); System.err.println("exported remote object"); ! Registry registry1 = TestLibrary.createRegistryOnUnusedPort(); ! int port = TestLibrary.getRegistryPort(registry1); System.err.println("created registry"); ! Registry registry = LocateRegistry.getRegistry("", port); registry.bind(BINDING, obj); System.err.println("bound remote object in registry"); synchronized (obj.lock) { registry.unbind(BINDING);