[omniORB] starting nameservice within a server

Duncan Grisby dgrisby@uk.research.att.com
Wed, 24 Oct 2001 11:52:13 +0100


On Tuesday 23 October, Matthias Hilmer wrote:

> i know that TAO provides a class (TAO_Naming_Server) that allows me to
> start the naming service from within the server (as a thread).

Why would you want to do that?  Is there any advantage over forking a
new process for it?  I suppose there will be a bit of a performance
gain, but if you're hitting the naming service hard enough for it to
matter, you probably shouldn't be.

> 1. is there any equivalent to this in omniorb? (i found nothing)

No.

> 2. if not, is it save to put the main line of omniNames.cc in a run method
>    of a class derived from omni_thread (naive spoken).

It depends. As long as you start the naming service before you
initialise the ORB anywhere else, you should be OK. omniNames forces
the use of a particular port number, which can only be done before
ORB_init(). If you do need to start the omniNames bits after
ORB_init(), it won't be too hard to modify the necessary bits so it
works.

Depending on what you are doing, you may encounter a licensing
problem with linking in omniNames. omniNames, like the other
applications in the omniORB distribution, is licensed under the GPL,
rather than the LGPL. That means that any of your code linked against
omniNames would have to be licensed under the GPL too if it was ever
released. It's not an issue if your application is only for use within
your organisation.

Cheers,

Duncan.

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