< prev index next >

test/java/rmi/activation/ActivationSystem/stubClassesPermitted/StubClassesPermitted.java

Print this page




  68  */
  69 public class StubClassesPermitted
  70     extends Activatable implements Runnable, CanCreateStubs
  71 {
  72     public static boolean sameGroup = false;
  73     private static int registryPort = -1;
  74     private static CanCreateStubs canCreateStubs = null;
  75     private static Registry registry = null;
  76 
  77     public static void main(String args[]) {
  78 
  79         sameGroup = true;
  80 
  81         RMID rmid = null;
  82 
  83         System.err.println("\nRegression test for bug/rfe 4179055\n");
  84 
  85         try {
  86             TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
  87 
  88             registry = TestLibrary.createRegistryOnUnusedPort();
  89             registryPort = TestLibrary.getRegistryPort(registry);
  90 
  91             // must run with java.lang.SecurityManager or the test
  92             // result will be nullified if running with a build where
  93             // 4180392 has not been fixed.
  94             String smClassName =
  95                 System.getSecurityManager().getClass().getName();
  96             if (!smClassName.equals("java.lang.SecurityManager")) {
  97                 TestLibrary.bomb("Test must run with java.lang.SecurityManager");
  98             }
  99 
 100             // start an rmid.
 101             RMID.removeLog();
 102             rmid = RMID.createRMIDOnEphemeralPort();
 103             rmid.start();
 104 
 105             //rmid.addOptions(new String[] {"-C-Djava.rmi.server.logCalls=true"});
 106 
 107             // Ensure that activation groups run with the correct
 108             // security manager.




  68  */
  69 public class StubClassesPermitted
  70     extends Activatable implements Runnable, CanCreateStubs
  71 {
  72     public static boolean sameGroup = false;
  73     private static int registryPort = -1;
  74     private static CanCreateStubs canCreateStubs = null;
  75     private static Registry registry = null;
  76 
  77     public static void main(String args[]) {
  78 
  79         sameGroup = true;
  80 
  81         RMID rmid = null;
  82 
  83         System.err.println("\nRegression test for bug/rfe 4179055\n");
  84 
  85         try {
  86             TestLibrary.suggestSecurityManager("java.lang.SecurityManager");
  87 
  88             registry = TestLibrary.createRegistryOnEphemeralPort();
  89             registryPort = TestLibrary.getRegistryPort(registry);
  90 
  91             // must run with java.lang.SecurityManager or the test
  92             // result will be nullified if running with a build where
  93             // 4180392 has not been fixed.
  94             String smClassName =
  95                 System.getSecurityManager().getClass().getName();
  96             if (!smClassName.equals("java.lang.SecurityManager")) {
  97                 TestLibrary.bomb("Test must run with java.lang.SecurityManager");
  98             }
  99 
 100             // start an rmid.
 101             RMID.removeLog();
 102             rmid = RMID.createRMIDOnEphemeralPort();
 103             rmid.start();
 104 
 105             //rmid.addOptions(new String[] {"-C-Djava.rmi.server.logCalls=true"});
 106 
 107             // Ensure that activation groups run with the correct
 108             // security manager.


< prev index next >