[omniORB] omniORBpy: Nesting Synchronous and Asynchronous Calls?

Duncan Grisby dgrisby@uk.research.att.com
Thu, 03 Feb 2000 10:06:39 +0000


On Wednesday 2 February, Randy wrote:

> Does the current version of omniORBpy support nesting an
> asynchronous call inside a synchronous call?

Yes.

> From looking at omniORB debug output, it appears that when the
> server receives the synchronous call, it does an (apparently)
> synchronous _is_a() call back to the client.  The client, which is
> still waiting for the initial synchronous call to return, ignores
> the _is_a() call, and eventually times out.

The problem is that you haven't activated the POA on the client side,
so the client isn't processing incoming requests. If you modify the
client code to say

    # Initialise the ORB
    orb = CORBA.ORB_init(argv, CORBA.ORB_ID)
    poa = orb.resolve_initial_references("RootPOA")
    poa._get_the_POAManager().activate()

then it will work. I also had to add a time.sleep(1) at the end of the
client, otherwise the program exited before the callback thread had
printed anything.

Cheers,

Duncan.

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