test/java/rmi/activation/ActivationSystem/modifyDescriptor/ModifyDescriptor.java

Print this page




  92     /**
  93      * Thread to deactivate object. First attempts to make object
  94      * inactive (via the inactive method).  If that fails (the
  95      * object may still have pending/executing calls), then
  96      * unexport the object forcibly.
  97      */
  98     public void run() {
  99         ActivationLibrary.deactivate(this, getID());
 100     }
 101 
 102     public static void main(String[] args) {
 103 
 104         System.out.println("\nRegression test for bug 4127754\n");
 105 
 106         TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
 107 
 108         RMID rmid = null;
 109 
 110         try {
 111             RMID.removeLog();
 112             rmid = RMID.createRMID();
 113             rmid.start();
 114 
 115             /*
 116              * Create and register a group and activatable object
 117              */
 118 
 119             System.err.println("Creating group descriptor");
 120             Properties props = new Properties();
 121             props.put("java.security.policy",
 122                   TestParams.defaultGroupPolicy);
 123             props.put("java.security.manager",
 124                   TestParams.defaultSecurityManager);
 125             props.put("test.message", MESSAGE1);
 126             ActivationGroupDesc initialGroupDesc =
 127                 new ActivationGroupDesc(props, null);
 128             System.err.println("Registering group");
 129             ActivationSystem system = ActivationGroup.getSystem();
 130             ActivationGroupID groupID = system.registerGroup(initialGroupDesc);
 131 
 132             System.err.println("Creating descriptor");




  92     /**
  93      * Thread to deactivate object. First attempts to make object
  94      * inactive (via the inactive method).  If that fails (the
  95      * object may still have pending/executing calls), then
  96      * unexport the object forcibly.
  97      */
  98     public void run() {
  99         ActivationLibrary.deactivate(this, getID());
 100     }
 101 
 102     public static void main(String[] args) {
 103 
 104         System.out.println("\nRegression test for bug 4127754\n");
 105 
 106         TestLibrary.suggestSecurityManager("java.rmi.RMISecurityManager");
 107 
 108         RMID rmid = null;
 109 
 110         try {
 111             RMID.removeLog();
 112             rmid = RMID.createRMIDOnEphemeralPort();
 113             rmid.start();
 114 
 115             /*
 116              * Create and register a group and activatable object
 117              */
 118 
 119             System.err.println("Creating group descriptor");
 120             Properties props = new Properties();
 121             props.put("java.security.policy",
 122                   TestParams.defaultGroupPolicy);
 123             props.put("java.security.manager",
 124                   TestParams.defaultSecurityManager);
 125             props.put("test.message", MESSAGE1);
 126             ActivationGroupDesc initialGroupDesc =
 127                 new ActivationGroupDesc(props, null);
 128             System.err.println("Registering group");
 129             ActivationSystem system = ActivationGroup.getSystem();
 130             ActivationGroupID groupID = system.registerGroup(initialGroupDesc);
 131 
 132             System.err.println("Creating descriptor");