[tao-users] Naming Service and multiple network adapters

Andriy Ruzhevych aru at mita-teknik.com
Mon Sep 14 10:14:45 CDT 2015


Hello

I have a problem with  accessing TAO Name Service.
Name Service is started as a service on Windows startup. Network interface is not initialized yet. As a result, Name Service IOR profile does not contain required endpoint(s).
I try to fix this problem in the following way:

1. Register IOR Interceptor for TAO_Naming_Service
2. in method NSIORInterceptor ::components_established replace PortableInterceptor:: ObjectReferenceFactory by my own object.
3. Override method ObjectReferenceFactory ::make_object.

simplified  method make_object implementation
make_object (const char *interface_repository_id,   const PortableInterceptor::ObjectId & id)
{
  CORBA::Object_ptr object_ptr_orig =   this->old_factory_->make_object (interface_repository_id,  id);
  TAO_Stub* pStub = object_ptr_orig->_stubobj();
  TAO_MProfile& mprofile = pStub->base_profiles();
  TAO_IIOP_Profile *iiop_profile = // find the IIOP profile by tag IOP::TAG_INTERNET_IOP

// create new endpoint and add it to profile
ACE_NEW_RETURN (endpoint, TAO_IIOP_Endpoint ("10.20.30.40", 2001, IOP::TAG_ALTERNATE_IIOP_ADDRESS), 0);
iiop_profile->add_endpoint (endpoint);

// add several alternate endpoints

return object_ptr_orig;
}
Looks like it's a wrong way or implementation is not completed, because resulting ior does not contain my added alternate address (check by tao_catior utility).

Question: How to add alternate addresses for IORs?
In general I have to change IOR profiles each time when available network interfaces list is changed.

Any suggestion?

Best regards
Andriy Ruzhevych
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20150914/b15fdef8/attachment.html>


More information about the tao-users mailing list