The Fault Tolerant Naming Service (FTNS) has some limitations compared to the regular CosNaming service. One of these limitations is that FTNS does not support BindingIterators. This means that you cannot iterate over the bindings in a naming context using an iterator.
The reason for this limitation is that, due to redundancy between a pair of naming servers, it is not guaranteed that the context structure being iterated on would remain consistent. Therefore, to ensure consistency, users are required to provide a sufficiently large value for the how_many
parameter when invoking the list operation. This allows the FTNS to return all bindings in a single call without needing an iterator. If the how_many
parameter is too small, the FTNS will throw a CORBA::NO_IMPLEMENT exception.
Another important point is that the FTNS implementation does not include any form of garbage collection for orphaned naming contexts. It is the responsibility of clients to clean up after themselves and avoid leaking server resources. During shutdown of the Naming Server, all resources, including orphaned contexts, are released.
In summary, with FTNS, you need to provide a sufficiently large how_many
value when listing bindings to ensure completeness without relying on iterators. Additionally, it’s crucial for clients to properly manage and clean up their naming contexts to avoid resource leaks in the server.
内容由零声教学AI助手提供,问题来源于学员提问