[omniORB] How to achieve per ORB/thread client connection timeouts
Thomas Braun
thomas.braun at byte-physics.de
Thu Jun 18 20:42:59 UTC 2026
Hi,
in tango controls we have a multithreaded client part of the program
which has multiple ORBs it connects to.
One of them is usually really busy, so the current code does something
like
class AutoConnectTimeout
{
public:
AutoConnectTimeout(unsigned int to)
{
omniORB::setClientConnectTimeout((CORBA::ULong) to);
}
~AutoConnectTimeout()
{
omniORB::setClientConnectTimeout(NARROW_CLNT_TIMEOUT);
}
};
} // namespace
const int NARROW_CLNT_TIMEOUT = 100;
const int DB_RECONNECT_TIMEOUT = 20000;
// code get's RAII object to change connect timeout
AutoConnectTimeout act(DB_RECONNECT_TIMEOUT);
The obvious issue is that the client connect timeout change is global,
so while the RAII object is in place also other threads connecting to
other ORBs see the modified connect timeout.
Am I missing something or is a per thread/ORB client connect timeout
not possible? Or am I misunderstanding things?
Thanks,
Thomas
More information about the omniORB-list
mailing list