Finding and Using Remote Objects
Now that we’ve seen how to implement a CORBA remote object and register it with an ORB, we can turn our attention to the heart of the matter: client applications that want to use the object. As we said earlier, every CORBA process needs a reference to an ORB. Once a client application has access to an ORB, next it must find remote objects to interact with. But before we can discuss finding remote objects, we need to talk a bit about what remote object references look like in the CORBA environment.
The whole point of CORBA is to be able to distribute objects across the network and use them from any point. In order for a local process to make requests of a remote object, it needs to have some kind of reference to that remote object. This object reference needs to contain enough information for the local ORB to find the ORB serving the target object and send the request to the remote ORB using an agreed-upon protocol.
Remote Object References and Narrowing
In most situations, a CORBA client has a reference to a remote object in the form of an object stub. The stub encapsulates the actual object reference, providing what seems like a direct interface to the remote object within the local environment. If the client is implemented in C++, Java, or some other object-oriented language, the object stub is a native object in that language. Other nonobject languages represent remote object references in whatever way is dictated in the CORBA language binding ...
Get Java Enterprise in a Nutshell, Third Edition 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.