[omniORB] Re: removing unnecessary entries from the log file ?

Duncan Grisby dgrisby@uk.research.att.com
Tue, 13 Mar 2001 17:43:49 +0000


On Tuesday 13 March, Stefan Radke wrote:

> thank you for your reply. In fact, I meant that the objects no longer exist.
> They remain logged in the log file, and the NamingContext's list() method
> seems to return the list from the log file.

The naming service continues to list the objects since nobody has
removed the bindings. The naming service never ever removes a binding
unless someone calls unbind(). Whether the object exists or not does
not come into it.

Try the following (with omniORB 3) to demonstrate what I mean:

  $ nameclt bind silly corbaloc::no.such.machine:1234/Hello
  $ nameclt resolve silly
  IOR:0100000001000000000000000100000000000000250000000101000010000
  0006e6f2e737563682e6d616368696e6500d20439310500000048656c6c6f

The naming service now contains a binding for an object which can't
possibly exist. The naming service doesn't care.

The only way you can automatically remove dead objects from the naming
service is to write a program which iterates over the naming service's
contents, trying to contact each object. If the communication fails,
the object has probably gone away.

The problem is that the CORBA object model says that just because you
can't contact a particular object at the moment, it doesn't mean that
you won't be able to contact it in future. If you impose that extra
restriction on your application's objects, it's not hard to
periodically clean out the naming service. It's a pretty time
consuming thing, though, since you need to contact every single
object.

Cheers,

Duncan.

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