10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* @test 25 * @bug 4290727 26 * @summary Verify that ConnectException will trigger HTTP fallback if 27 * sun.rmi.transport.proxy.eagerHttpFallback system property is set. 28 * 29 * @library ../../../../java/rmi/testlibrary 30 * @build TestLibrary 31 * @run main/othervm EagerHttpFallback 32 */ 33 34 import java.rmi.*; 35 import java.rmi.registry.*; 36 37 public class EagerHttpFallback { 38 39 static final int INITIAL_PORT = TestLibrary.getUnusedRandomPort(); 40 static final int FALLBACK_PORT = TestLibrary.getUnusedRandomPort(); 41 42 public static void main(String[] args) throws Exception { 43 System.setProperty("http.proxyHost", "127.0.0.1"); 44 System.setProperty("http.proxyPort", Integer.toString(FALLBACK_PORT)); 45 System.setProperty("sun.rmi.transport.proxy.eagerHttpFallback", 46 "true"); 47 LocateRegistry.createRegistry(FALLBACK_PORT); 48 49 /* | 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* @test 25 * @bug 4290727 26 * @summary Verify that ConnectException will trigger HTTP fallback if 27 * sun.rmi.transport.proxy.eagerHttpFallback system property is set. 28 * 29 * @library ../../../../java/rmi/testlibrary 30 * @modules java.rmi/sun.rmi.registry 31 * java.rmi/sun.rmi.server 32 * java.rmi/sun.rmi.transport 33 * java.rmi/sun.rmi.transport.tcp 34 * @build TestLibrary 35 * @run main/othervm EagerHttpFallback 36 */ 37 38 import java.rmi.*; 39 import java.rmi.registry.*; 40 41 public class EagerHttpFallback { 42 43 static final int INITIAL_PORT = TestLibrary.getUnusedRandomPort(); 44 static final int FALLBACK_PORT = TestLibrary.getUnusedRandomPort(); 45 46 public static void main(String[] args) throws Exception { 47 System.setProperty("http.proxyHost", "127.0.0.1"); 48 System.setProperty("http.proxyPort", Integer.toString(FALLBACK_PORT)); 49 System.setProperty("sun.rmi.transport.proxy.eagerHttpFallback", 50 "true"); 51 LocateRegistry.createRegistry(FALLBACK_PORT); 52 53 /* |