[omniORB] Regarding NamingService

Duncan Grisby dgrisby@uk.research.att.com
Mon, 25 Sep 2000 12:39:34 +0100


On Monday 25 September, Ramchandra Phadake wrote:

> But my requirement is such that out of 3/4 instances availble of the same
> service i have to take any one
> dynamically? Is it possible with Naming service ? 

You cannot bind more than one object to a single name. One solution is
to implement a "directory" object which you register in the naming
service. The directory knows all of the instances of your service, and
can return them in whatever form is useful to you. Perhaps something
like...

  interface MyService {
    ...
  };
  typedef sequence <MyService> MyServiceList;

  interface MyServiceDirectory {
    MyService pickOneServiceInstance();
    MyServiceList listAllServiceInstances();
  };

Cheers,

Duncan.

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