Reputation: 691
We are developing a C++ CORBA client using the omniORB libraries.
Our application needs to connect to two different servers, each hosted on a different machine. To achieve this we use two CORBA::ORB_ptr
variables. What is funny is that our programs appear to work correctly when we connect to one server no matter which, but when one ORB_ptr
is active then attempting to connect to the second gives us a CosNaming::NamingContext::NotFound
exception.
Upvotes: 0
Views: 563
Reputation: 3002
You shouldn't need to ORB variables to connect to two servers, you need two object references, one for each server, that can be done using one ORB. For both servers you have to retrieve the object reference from for example the naming service, narrow them to the correct type, and you can use them.
Check a CORBA book, for example see http://www.ciaranmchale.com/corba-explained-simply or see the examples/tests that distributions ship.
Upvotes: 0