[omniORB] Server hangs

Duncan Grisby dgrisby@uk.research.att.com
Wed, 29 Nov 2000 17:27:07 +0000


On Tuesday 28 November, Mike Olson wrote:

>  filename="Server.tgz"

[ See my last message about the bug being fixed. ]

I have an unrelated comment about your example. Your client code does:

    server = root.resolve([CosNaming.NameComponent('factory','')])
    server._narrow(Server.ServerFactory)
    return server

The use of _narrow() is wrong. _narrow() returns a new object
reference, rather than modifying the one you give it, so the correct
code is

    server = server._narrow(Server.ServerFactory)

You get away with using it incorrectly since in your example, the
object is always of the correct type, rather than something derived
from it.

_narrow() has to work like that so that it can return None (i.e. a nil
object reference) when the object reference has the wrong interface.

Cheers,

Duncan.

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