8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 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 /* 25 * @test 26 * @bug 6676075 27 * @summary RegistryContext (com.sun.jndi.url.rmi.rmiURLContext) coding problem 28 * @library ../../../../../../java/rmi/testlibrary 29 * @build TestLibrary 30 * @run main ContextWithNullProperties 31 */ 32 33 import com.sun.jndi.rmi.registry.RegistryContext; 34 import java.rmi.registry.Registry; 35 36 public class ContextWithNullProperties { 37 public static void main(String[] args) throws Exception { 38 Registry registry = TestLibrary.createRegistryOnUnusedPort(); 39 int registryPort = TestLibrary.getRegistryPort(registry); 40 System.out.println("Connecting to the default Registry..."); 41 // Connect to the default Registry. 42 // Pass null as the JNDI environment properties (see final argument) 43 RegistryContext ctx = new RegistryContext(null, registryPort, null); 44 } 45 } | 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 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 /* 25 * @test 26 * @bug 6676075 27 * @summary RegistryContext (com.sun.jndi.url.rmi.rmiURLContext) coding problem 28 * @modules jdk.naming.rmi/com.sun.jndi.rmi.registry java.rmi/sun.rmi.registry 29 * java.rmi/sun.rmi.server java.rmi/sun.rmi.transport java.rmi/sun.rmi.transport.tcp 30 * @library ../../../../../../java/rmi/testlibrary 31 * @build TestLibrary 32 * @run main ContextWithNullProperties 33 */ 34 35 import com.sun.jndi.rmi.registry.RegistryContext; 36 import java.rmi.registry.Registry; 37 38 public class ContextWithNullProperties { 39 public static void main(String[] args) throws Exception { 40 Registry registry = TestLibrary.createRegistryOnUnusedPort(); 41 int registryPort = TestLibrary.getRegistryPort(registry); 42 System.out.println("Connecting to the default Registry..."); 43 // Connect to the default Registry. 44 // Pass null as the JNDI environment properties (see final argument) 45 RegistryContext ctx = new RegistryContext(null, registryPort, null); 46 } 47 } |