ContextWithNullProperties.java revision 5266
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * This code is free software; you can redistribute it and/or modify it
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * under the terms of the GNU General Public License version 2 only, as
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * published by the Free Software Foundation.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * This code is distributed in the hope that it will be useful, but WITHOUT
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * version 2 for more details (a copy is included in the LICENSE file that
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * accompanied this code).
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * You should have received a copy of the GNU General Public License version
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * 2 along with this work; if not, write to the Free Software Foundation,
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering * or visit www.oracle.com if you need additional information or have any
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering * @bug 6676075
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering * @summary RegistryContext (com.sun.jndi.url.rmi.rmiURLContext) coding problem
490aed584944b684026a3fd01f8d81f2881e38d6Lennart Poettering * @library ../../../../../../java/rmi/testlibrary
5a1e99375d03bc88795d68c66bf3933dd04c1015Lennart Poettering * @build TestLibrary
036643a247c659db8e1b3df1778d51553a816ec9Lennart Poettering * @run main ContextWithNullProperties
32d0463d5c9982cc0c98a6e2867f94c764a496c2Lennart Poetteringimport com.sun.jndi.rmi.registry.RegistryContextsun.jndi.rmi.RegistryContext;
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering public static void main(String[] args) throws Exception {
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering Registry registry = TestLibrary.createRegistryOnUnusedPort();
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering int registryPort = TestLibrary.getRegistryPort(registry);
cb06add70d69eae1a990da283e1a582ee98a142dLennart Poettering System.out.println("Connecting to the default Registry...");
cb06add70d69eae1a990da283e1a582ee98a142dLennart Poettering // Connect to the default Registry.
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering // Pass null as the JNDI environment properties (see final argument)