test/java/rmi/activation/Activatable/lookupActivationSystem/LookupActivationSystem.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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.
@@ -56,11 +56,11 @@
rmid = RMID.createRMID();
rmid.start();
System.err.println("look up activation system");
Registry rmidRegistry =
- LocateRegistry.getRegistry(ActivationSystem.SYSTEM_PORT);
+ LocateRegistry.getRegistry(rmid.getPort());
ActivationSystem system = (ActivationSystem)
rmidRegistry.lookup(NAME);
if (system instanceof ActivationSystem) {
System.err.println("test1 passed: lookup succeeded");