[omniORB] omniORB client with VisiBroker Naming Service

Duncan Grisby dgrisby@uk.research.att.com
Thu, 06 Apr 2000 15:50:24 +0100


On Thursday 6 April, "Laura Seidensticker" wrote:

> What versions of omniORB do not work with the Visibroker Naming Service?
> I am using omniORB 2.6.

All versions of omniORB before the most recent snapshots of omniORB
2.8 incorrectly reject naming services which are derived from
CosNaming::NamingContext, if they are specified in omniORB's
configuration. In other words, if someone's naming service provides
objects with an interface like

  interface MyORBsNamingContext : CosNaming::NamingContext {
    // Some ORB-specific stuff
  };

Then you cannot set that to be the naming service returned from
resolve_initial_references(). If you receive a reference to such an
object by any other means, it will work fine.

It is easy to fix the problem in all versions of omniORB. The file to
edit is initFile.cc which is in either src/lib/omniORB2/orbcore/ or
src/lib/omniORB2/ depending upon which version of omniORB you have.

Find the bit of code which looks like

	  if((NameService->PR_getobj()->_widenFromTheMostDerivedIntf(
				  CosNaming_NamingContext_IntfRepoID)) == 0)
	    {
	      // The object reference supplied is not for the NamingService
	      
	      invref(entryname);
	    }    

and remove it.

After that, you will be able to use any naming service derived from
CosNaming::NamingContext.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --