Day 9

Quiz

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.

Exercises

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 ...

Get Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.