[omniORB] Oneway calls not working on local execution

Tomas Staig tomas.staig at gmail.com
Mon Nov 30 19:04:16 UTC 2020


Dear all,
   we use omniORBpy for a long time now, but just recently we noticed a
problem with oneway operations when both the client and the servant are on
the same process. We have a container/component model on top of CORBA, so
we don't impose restrictions on the deployment of the CORBA objects, which
means this situation can happen depending on the developers and the people
doing the deployment.

I made an isolated test using omniORBpy that exposes the situation:
#ifndef _ASYNC_MODULE_IDL_
#define _ASYNC_MODULE_IDL_

#pragma prefix "acsws"

module AsyncModule
{
    interface AsyncExample {
        oneway void delay(in long sleepSec);
    };
};
#endif

Then, the implementation would be:
import sys
import time
import datetime

import AsyncModule
import AsyncModule__POA

from omniORB import CORBA, PortableServer

class AsyncExampleImpl(AsyncModule__POA.AsyncExample):
    def delay(self, sleepSec):
        print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"),
"Start")
        time.sleep(sleepSec)
        print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"),
"Finish")

orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")

servant = AsyncExampleImpl()
obj = servant._this()

poaManager = poa._get_the_POAManager()
poaManager.activate()

print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"), "Before")
result  = obj.delay(2)
print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f"), "After")

The output I receive is the following:
2020-11-30 19:00:38.022027 Before
2020-11-30 19:00:38.022068 Start
2020-11-30 19:00:40.023909 Finish
2020-11-30 19:00:40.024071 After

Which shows that the process remained waiting for the oneway operation to
finish before continuing.

When splitting this in two processes (client and server), the output is the
following:
2020-11-30 19:02:13.797152 Before
2020-11-30 19:02:13.797635 After
2020-11-30 19:02:13.797742 Start
2020-11-30 19:02:15.800049 Finish

Which is what I would expect from a oneway operation.

Thanks a lot!

Best regards,
Tomas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.omniorb-support.com/pipermail/omniorb-list/attachments/20201130/75445ad7/attachment.html>


More information about the omniORB-list mailing list