< prev index next >
test/java/rmi/activation/Activatable/forceLogSnapshot/ForceLogSnapshot.java
Print this page
*** 20,30 ****
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
! * @bug 4173960
* @summary synopsis: Activatable objects cannot be restarted.
* @author Laird Dornin
*
* @library ../../../testlibrary
* @modules java.rmi/sun.rmi.registry
--- 20,30 ----
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
! * @bug 4173960 8085192
* @summary synopsis: Activatable objects cannot be restarted.
* @author Laird Dornin
*
* @library ../../../testlibrary
* @modules java.rmi/sun.rmi.registry
*** 35,44 ****
--- 35,45 ----
* ActivateMe ForceLogSnapshot_Stub
* @run main/othervm/policy=security.policy/timeout=640 ForceLogSnapshot
*/
import java.io.*;
+ import java.net.BindException;
import java.rmi.*;
import java.rmi.activation.*;
import java.rmi.server.*;
import java.rmi.registry.*;
import java.util.*;
*** 126,139 ****
--- 127,149 ----
try {
String option = " -Dsun.rmi.activation.snapshotInterval=" +
SNAPSHOT_INTERVAL;
+ for (int i = 0; i < 20; i++) {
RMID.removeLog();
rmid = RMID.createRMID();
rmid.addOptions(new String[] {option, "-Djava.compiler="});
+ try {
rmid.start();
+ break;
+ } catch (BindException ex) {
+ System.err.format("%ncatch BindException(%s), "
+ + "continue to launch rmid again...%n%n", ex.getMessage());
+ continue;
+ }
+ }
/* Cause activation groups to have a security policy that will
* allow security managers to be downloaded and installed
*/
Properties p = new Properties();
< prev index next >