[tao-users] Rebinding CORBA object reference

Milan Cvetkovic milan.cvetkovic at mpathix.com
Thu May 31 11:53:20 CDT 2018


PRF:

TAO VERSION: 2.3.3
ACE VERSION: 6.3.3

HOST MACHINE and OPERATING SYSTEM: Linux Debian 8 on amd64
THE $ACE_ROOT/ace/config.h FILE: config-linux.h

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU:
platform_linux.GNU

SYNOPSIS:

Is there a way to force rebinding of a valid reference to a corba object:

DESCRIPTION:

Client application is experiencing timeouts after extended inactivity.
Client and server are in different networks, connected through NAT.  I
would like to force the client to rebind (close TCP connection, and
reconnect) on CORBA::TIMEOUT:

Sample:

CORBA::Object_var o = orb->string_to_object ("corbaloc:...");
MyObject_var mo = MyObject::_narrow (o.in());
mo->op ();
ACE_OS::sleep (3600);

try
{
   mo->op();
}
catch (CORBA::TIMEOUT&)
{
   // here I would like to close the existing transport,
   // and force reconnect.
#if 0
   // this would work, but requires me to keep copies of orb and IOR
   // reference around
   o = orb->string_to_object ("corbaloc:...");
   mo = MyObject::_narrow (o.in());
#endif
}

Thanks, Milan


More information about the tao-users mailing list