October 2002
Beginner
816 pages
23h 32m
English
| A1: | To register a server object with the naming service, use the bind() method of the Context object. |
| A2: | Use the lookup() method of the Context object to look up the server object registered in the naming service. Cast the object to its appropriate type to use it in the application. |
| A3: | To reregister a server object in the naming service, you need to use the rebind() method of the Context object. The rebind() method overwrites the current object reference in the naming service with the new object reference. |
| A1: | After you have created your context object in Listing 9.5, add the following code, which gets the namespace of the Context and then enumerates the contents:
String ctxName = ctx.getNameInNamespace(); NamingEnumeration ... |
Read now
Unlock full access