Creating a CORBA Client
Creating a CORBA client program is much easier than creating a server. You use the same procedure to initialize the ORB in the client as you do in the server. Once again, you must set system properties to specify different ORB implementation classes if you use an ORB other than the one built into the JDK. You also locate the naming service the same way in the client as you do in the server.
After you locate the naming service, use the resolve method to locate the CORBA object. Resolve takes an array of NameComponent objects just like you use in the rebind method. After you locate the object, use the narrow method to cast the Object reference to the type you want.
Listing 17.3 shows the MOTDClient program that interacts ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access