test/java/rmi/testlibrary/RegistryRunner.java

Print this page

        

*** 54,69 **** /** * Request that the registry process exit and handle * related exceptions. */ ! public static void requestExit() { try { RemoteExiter exiter = (RemoteExiter) Naming.lookup("rmi://localhost:" + ! TestLibrary.REGISTRY_PORT + "/RemoteExiter"); try { exiter.exit(); } catch (RemoteException re) { } --- 54,70 ---- /** * Request that the registry process exit and handle * related exceptions. */ ! public static void requestExit(int port) { ! try { RemoteExiter exiter = (RemoteExiter) Naming.lookup("rmi://localhost:" + ! port + "/RemoteExiter"); try { exiter.exit(); } catch (RemoteException re) { }
*** 82,92 **** try { if (args.length == 0) { System.err.println("Usage: <port>"); System.exit(0); } ! int port = TestLibrary.REGISTRY_PORT; try { port = Integer.parseInt(args[0]); } catch (NumberFormatException nfe) { } --- 83,93 ---- try { if (args.length == 0) { System.err.println("Usage: <port>"); System.exit(0); } ! int port = -1; try { port = Integer.parseInt(args[0]); } catch (NumberFormatException nfe) { }