test/java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java
Print this page
*** 29,38 ****
--- 29,40 ----
* particular, after the stub has become unreachable and all
* connections to its endpoint have been closed, then the factory
* should become unreachable too (through the RMI implementation).
* @author Peter Jones
*
+ * @library ../../testlibrary
+ * @build TestLibrary
* @run main/othervm -Dsun.rmi.transport.connectionTimeout=2000
* PinClientSocketFactory
*/
import java.io.IOException;
*** 54,64 ****
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
public class PinClientSocketFactory {
! private static final int PORT = 2345;
private static final int SESSIONS = 50;
public interface Factory extends Remote {
Session getSession() throws RemoteException;
}
--- 56,66 ----
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
public class PinClientSocketFactory {
! private static final int PORT = TestLibrary.getUnusedRandomPort();
private static final int SESSIONS = 50;
public interface Factory extends Remote {
Session getSession() throws RemoteException;
}