[omniORB] weirdness in a _narrow call

Sai-Lai Lo S.Lo@orl.co.uk
01 Jul 1998 18:07:20 +0100


Graydon Hoare <gray@interlog.com> writes:

> I have a routine I am using in constructing an object loaded off disk,
> which _narrow()s the reference it gets back from omniNames into a
> type I have defined. This works fine when the call for a new object comes
> from in-process. It does not work with a call coming from out of process
> -- the _narrow call just hangs. The odd part is that in both cases the
> reference it's narrowing is in the same location wrt the narrow call. In
> process, created by the same constructor. Odd. Anyone seen this before?
> 

It would be easier for us to understand where the problem is if you can
supply a test case.

In general, a _narrow() may cause the ORB to contact the object to find out
its actual type if there is insufficent information in the current address
space (omniORB2 user guide, Chapter 6 interface type checking). Now if the 
ORB runtime in the target object's address space has not been initialised
to receive IIOP request, you may see the _narrow call just hangs:

For example, you may have written something like this:

    CORBA::ORB_ptr orb = CORBA::ORB_init(...);
    CORBA::BOA_ptr boa = orb->BOA_init(...);

But have forgot to do:
    boa->impl_is_ready(0,1); // Just tell the BOA we are ready and
                             // return immediately.

Regards,

Sai-Lai

-- 
Dr. Sai-Lai Lo                          |       Research Scientist
                                        |
E-mail:         S.Lo@orl.co.uk          |       Olivetti & Oracle Research Lab
                                        |       24a Trumpington Street
Tel:            +44 223 343000          |       Cambridge CB2 1QA
Fax:            +44 223 313542          |       ENGLAND