Please report new issues athttps://github.com/DOCGroup
This is related to the change entered to allow a collocated name service (Fri Aug 20 15:51:29 1999 by Nanbor Wang). I don't believe the change ever got a tracking number. When resolve_initial_references attempts to resolve an IOR, the ORB's lookup table should be searched before the orb core's lookup table. There are several reasons this is better, but one in particular is that the IOR in the orb may be known to be collocated, whereas the orb core's IOR is not. This can be demonstrated with the attached example. The example creates a TAO_Naming_Server and inits it, then proceeds to register an IOR (I registered the NameServer with itself just for the example). The NameService initial reference was set to point to a NameService in this orb in the root poa. This is one means to prevent multicast resolution because if the name service isn't up this results in a CORBA::TRANSIENT exception. If you reverse the lines in ORB.cpp as shown in the patch, you will see a very different amount of ORB traffic when the IORs are narrowed. Admittedly, the order of the search is irrelevant if the ORBInitRef argument is removed, but I believe this change will make TAO more stable overall in the presence of unusual configurations (like this one).
Created attachment 9 [details] Diff that changes the precidence of IOR tables in resolve_initial_references (ORB.cpp)
Created attachment 10 [details] An example that demonstrates the difference in behavior due to the patch.
I am not sure if i understand the problem, but from your initial description and patch i believe that this is not a patch: the INS spec requires the ORB to use the -ORBInitRef option before any other lookup mechanism.