EAServer allows you to use the CORBA CosNaming interface to instantiate proxies in your client applications. This technique of instantiating proxies is not recommended, because it requires use of deprecated SessionManager::Factory methods. “Instantiating stub instances” describes the recommended technique for stub instantiation.
You do not need to use the CosNaming API in clients to realize the benefits incurred by using logical component names. EAServer uses the CosNaming API to resolve component names in the implementation of the Session::lookup and Session::create methods.
To use CosNaming, follow these steps:
Step |
What it does |
Detailed explanation |
---|---|---|
1 |
Configure ORB properties, including the ORB runtime driver class and the EAServer naming server URL, then initialize the ORB runtime. |
|
2 |
Instantiate the CORBA CosNaming name service and obtain the initial naming context. |
|
3 |
Instantiate proxy objects and narrow them to the stub interface. |
|
4 |
Call the proxy objects to remotely invoke component methods. |
All examples in this section are taken from the arith.cpp file for the C++ client tutorial, describe in Chapter 3, “Creating C++ Components and Clients,” in the EAServer Cookbook.
Copyright © 2005. Sybase Inc. All rights reserved. |