test/java/rmi/activation/ActivateFailedException/activateFails/ActivateFails.java

Print this page




  76     {
  77         ShutdownThread shutdownThread = new ShutdownThread(this, getID());
  78         shutdownThread.start();
  79         return(shutdownThread);
  80     }
  81 
  82     public static void main(String[] args)
  83     {
  84         RMID rmid = null;
  85         ActivateMe obj1, obj2;
  86         ShutdownThread shutdownThread;
  87 
  88         System.err.println("\nRegression test for bug 4097135\n");
  89         try {
  90             TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
  91 
  92             /*
  93              * First run "rmid" and wait for it to start up.
  94              */
  95             RMID.removeLog();
  96             rmid = RMID.createRMID();
  97             rmid.start();
  98 
  99             /* Cause activation groups to have a security policy that will
 100              * allow security managers to be downloaded and installed
 101              */
 102             Properties p = new Properties();
 103             // this test must always set policies/managers in its
 104             // activation groups
 105             p.put("java.security.policy",
 106                   TestParams.defaultGroupPolicy);
 107             p.put("java.security.manager",
 108                   TestParams.defaultSecurityManager);
 109 
 110             /*
 111              * Create activation descriptor...
 112              */
 113             System.err.println("creating activation descriptor...");
 114             ActivationGroupDesc groupDesc =
 115                 new ActivationGroupDesc(p, null);
 116             ActivationGroupID groupID =




  76     {
  77         ShutdownThread shutdownThread = new ShutdownThread(this, getID());
  78         shutdownThread.start();
  79         return(shutdownThread);
  80     }
  81 
  82     public static void main(String[] args)
  83     {
  84         RMID rmid = null;
  85         ActivateMe obj1, obj2;
  86         ShutdownThread shutdownThread;
  87 
  88         System.err.println("\nRegression test for bug 4097135\n");
  89         try {
  90             TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
  91 
  92             /*
  93              * First run "rmid" and wait for it to start up.
  94              */
  95             RMID.removeLog();
  96             rmid = RMID.createRMIDOnEphemeralPort();
  97             rmid.start();
  98 
  99             /* Cause activation groups to have a security policy that will
 100              * allow security managers to be downloaded and installed
 101              */
 102             Properties p = new Properties();
 103             // this test must always set policies/managers in its
 104             // activation groups
 105             p.put("java.security.policy",
 106                   TestParams.defaultGroupPolicy);
 107             p.put("java.security.manager",
 108                   TestParams.defaultSecurityManager);
 109 
 110             /*
 111              * Create activation descriptor...
 112              */
 113             System.err.println("creating activation descriptor...");
 114             ActivationGroupDesc groupDesc =
 115                 new ActivationGroupDesc(p, null);
 116             ActivationGroupID groupID =