I want to ensure my CORBA client is resilient to outages, I have the client working and am testing resilience by disabling by network adapter in Windows. The CORBA connection obviously fails, and the functionality is unavailable, but then it does not recover when the adapter is enabled again. ORB.init
is called again but I continue to get the same errors.
It seems as if after org.omg.CORBA.TRANSIENT
is thrown some static state is kept which causes the client to report a network connection timeout even when the problem is fully resolved. Only restarting the process (a dropwizard runnable JAR) will allow the client to work again.
This is the code that starts up the ORB:
String[] orbInits = {"-ORBInitRef", orbInitRef};
Properties properties = new Properties() {
{
setProperty("org.omg.CORBA.ORBClass", orbClass);
setProperty("org.omg.CORBA.ORBSingletonClass", orbSingletonClass);
setProperty("jacorb.connection.client.connect_timeout", "" + connectionTimeout);
}
};
return ORB.init(orbInits, properties);
The problem persists even if the app is calling ORB.init upon each attempt to perform the operation (i.e. with ORB pooling switched off).
Errors thrown by the client in the outage scenario include:
org.omg.CORBA.TIMEOUT: connection timeout of 2000 milliseconds expired
org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to <IP>:<PORT>
In at least one (possibly all) cases there was no org.omg.CORBA.TIMEOUT before org.omg.CORBA.TRANSIENT
became permanent (i.e. TIMEOUT
may be log noise).
Obviously becuase the client is also a server we'd prefer to not have to restart it after every outage (and they do happen, especially in the dev environment).
The implementation is JACORB (org.jacorb.orb.ORB / org.jacorb.orb.ORBSingleton) version 2.2.4.