After migrating our client application to Omero4.1 we see omero session timeout exceptions we haven't seen before. Did something change in the session management and timeout settings?
A little bit background information: the application is run in interactive mode, this means the connection can be idle for a couple of minutes before new requests to the server are made. In order to guarantee valid service objects I automatically recreate an omero client object and a ServiceFactoryPrx if a timeout exception occurs:
- Code: Select all
// session_, username_ and password_ are class members
// session is a ServiceFactoryPrx
ServiceFactoryPrx getSession() {
if (session_) {
try {
session_->ice_ping();
} catch (const Ice::ConnectionLostException& e) {
// recreate session
client_->closeSession();
session_ = client_->createSession(username_, password_);
session_->closeOnDestroy();
}
}
return session_;
}
In order to avoid omero timeout exceptions at a higher level, I could add another handler for those exceptions but I'm wondering whether there is another option like setting the ice communication timeout value to the same as the omero session timeout.
Thanks for help! Bernhard