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

Print this page

        

*** 66,77 **** } } public static void main(String[] args) { try { Registry registry = ! LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT); ShutdownMonitor monitor = (ShutdownMonitor) registry.lookup(KeepAliveDuringCall.BINDING); System.err.println("(ShutdownImpl) retrieved shutdown monitor"); impl = new ShutdownImpl(monitor); --- 66,78 ---- } } public static void main(String[] args) { try { + int registryPort = new Integer(System.getProperty("rmi.registry.port")); Registry registry = ! LocateRegistry.getRegistry("", registryPort); ShutdownMonitor monitor = (ShutdownMonitor) registry.lookup(KeepAliveDuringCall.BINDING); System.err.println("(ShutdownImpl) retrieved shutdown monitor"); impl = new ShutdownImpl(monitor);