Skip to content
Snippets Groups Projects
Commit 22747ca5 authored by Serguei Kolos's avatar Serguei Kolos
Browse files

Add TIMEOUT exception handling to the reconnect procedure

parent 5fbd363a
No related branches found
Tags ipc-05-14-10_01
No related merge requests found
......@@ -75,7 +75,8 @@ class IPCCache : public boost::noncopyable
static CORBA::Boolean commfailure_handler ( void * cookie, CORBA::ULong retries, const CORBA::COMM_FAILURE& );
static CORBA::Boolean system_handler ( void * cookie, CORBA::ULong retries, const CORBA::SystemException& );
static CORBA::Boolean transient_handler ( void * cookie, CORBA::ULong retries, const CORBA::TRANSIENT& );
static CORBA::Boolean timeout_handler ( void * cookie, CORBA::ULong retries, const CORBA::TIMEOUT& );
private:
boost::mutex m_mutex;
std::map<std::string, Entity> m_map;
......
......@@ -25,8 +25,10 @@ CORBA::Object_ptr IPCCache::Entity::getObject()
if (!CORBA::is_nil(m_object)) {
ERS_DEBUG( 2, "New object reference was found");
omniORB::installTransientExceptionHandler(m_object, this,
transient_handler);
omniORB::installTimeoutExceptionHandler(m_object, this,
timeout_handler);
omniORB::installTransientExceptionHandler(m_object, this,
transient_handler);
omniORB::installCommFailureExceptionHandler(m_object, this,
commfailure_handler);
omniORB::installSystemExceptionHandler(m_object, this,
......@@ -59,8 +61,10 @@ bool IPCCache::Entity::recover(bool is_timedout)
else {
ERS_DEBUG( 2, "Replacing nil reference with the new one");
m_object = CORBA::Object::_duplicate(new_ref);
omniORB::installTransientExceptionHandler(m_object, this,
transient_handler);
omniORB::installTimeoutExceptionHandler(m_object, this,
timeout_handler);
omniORB::installTransientExceptionHandler(m_object, this,
transient_handler);
omniORB::installCommFailureExceptionHandler(m_object, this,
commfailure_handler);
omniORB::installSystemExceptionHandler(m_object, this,
......@@ -167,6 +171,12 @@ CORBA::Boolean IPCCache::transient_handler(void * cookie, CORBA::ULong retries,
return system_handler(cookie, retries, ex);
}
CORBA::Boolean IPCCache::timeout_handler(void * cookie, CORBA::ULong retries,
const CORBA::TIMEOUT& ex)
{
return system_handler(cookie, retries, ex);
}
CORBA::Boolean IPCCache::commfailure_handler(void * cookie,
CORBA::ULong retries, const CORBA::COMM_FAILURE & ex)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment