test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 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) 1999, 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.
*** 59,69 ****
*/
public class StubClassesPermitted
extends Activatable implements Runnable, CanCreateStubs
{
public static boolean sameGroup = false;
!
private static CanCreateStubs canCreateStubs = null;
private static Registry registry = null;
public static void main(String args[]) {
--- 59,69 ----
*/
public class StubClassesPermitted
extends Activatable implements Runnable, CanCreateStubs
{
public static boolean sameGroup = false;
! private static int registryPort = -1;
private static CanCreateStubs canCreateStubs = null;
private static Registry registry = null;
public static void main(String args[]) {
*** 74,85 ****
System.err.println("\nRegression test for bug/rfe 4179055\n");
try {
TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
! registry = java.rmi.registry.LocateRegistry.
! createRegistry(TestLibrary.REGISTRY_PORT);
// must run with java.lang.SecurityManager or the test
// result will be nullified if running with a build where
// 4180392 has not been fixed.
String smClassName =
--- 74,85 ----
System.err.println("\nRegression test for bug/rfe 4179055\n");
try {
TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
! registry = TestLibrary.createRegistryOnUnusedPort();
! registryPort = TestLibrary.getRegistryPort(registry);
// must run with java.lang.SecurityManager or the test
// result will be nullified if running with a build where
// 4180392 has not been fixed.
String smClassName =
*** 190,200 ****
// register/export anonymously
super(id, 0);
// obtain reference to the test registry
registry = java.rmi.registry.LocateRegistry.
! getRegistry(TestLibrary.REGISTRY_PORT);
}
/**
* Spawns a thread to deactivate the object.
*/
--- 190,200 ----
// register/export anonymously
super(id, 0);
// obtain reference to the test registry
registry = java.rmi.registry.LocateRegistry.
! getRegistry(registryPort);
}
/**
* Spawns a thread to deactivate the object.
*/