test/java/rmi/server/UnicastRemoteObject/keepAliveDuringCall/ShutdownImpl.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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.
@@ -66,12 +66,13 @@
}
}
public static void main(String[] args) {
try {
+ int registryPort = Integer.parseInt(System.getProperty("rmi.registry.port"));
Registry registry =
- LocateRegistry.getRegistry("", TestLibrary.REGISTRY_PORT);
+ LocateRegistry.getRegistry("", registryPort);
ShutdownMonitor monitor = (ShutdownMonitor)
registry.lookup(KeepAliveDuringCall.BINDING);
System.err.println("(ShutdownImpl) retrieved shutdown monitor");
impl = new ShutdownImpl(monitor);