test/java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 35,44 **** --- 35,45 ---- * @author Peter Jones * * @library ../../../testlibrary * @build FiniteGCLatency * @build FiniteGCLatency_Stub + * @build TestLibrary * @run main/othervm/timeout=120 FiniteGCLatency */ import java.rmi.*; import java.rmi.registry.*;
*** 76,90 **** FiniteGCLatency obj = new FiniteGCLatency(); try { 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); --- 77,91 ---- FiniteGCLatency obj = new FiniteGCLatency(); try { 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);