![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e472. Creating an Initial Context to the Naming ServiceThis example uses the JNDI/COS naming service provider to connect to the local tnameserv.String url = "iiop://localhost/"; Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory"); env.put(Context.PROVIDER_URL, url); try { Context ctx = new InitialContext(env); } catch (NamingException e) { }
e474. Listing a Context in the Naming Service e475. Adding, Replacing, Removing, and Renaming a Binding in the Naming Service e476. Creating and Destroying a Subcontext in the Naming Service e477. Getting an Object's Fully Qualified Name e478. Using a URL as a Name to the Initial Context e479. Parsing a JNDI Composite Name e480. Parsing a JNDI Compound Name © 2002 Addison-Wesley. |