How to get immediatly informed in client when server is shut down

51 views
Skip to first unread message

Torsten Franz

unread,
Jul 29, 2016, 5:47:24 AM7/29/16
to OrientDB
Hi,
using JAVA client API, how can I get informed by an event if the database server is shut down?
I know I get some communication channel exception in a random thread but did not find any event to which I could attach to which will be triggered by this exception.

running v2.2.3...

Thanks
Torsten

odbuser

unread,
Aug 4, 2016, 12:18:43 AM8/4/16
to OrientDB
If you are using an embedded server, you can register a lifecyclelistener on the OServer.
http://orientdb.com/javadoc/latest/com/orientechnologies/orient/server/OServer.html#lifecycleListeners

But I think you are probably using the client to connect to a remote in which I case I'm not aware of any lifecycle methods.

Torsten Franz

unread,
Aug 5, 2016, 9:45:53 AM8/5/16
to OrientDB
Thanks, yes I'm using remote connection and those lifecycle listeners won't work there :-(

odbuser

unread,
Aug 6, 2016, 4:10:50 AM8/6/16
to OrientDB
Ah, I just read your two issues:

https://github.com/orientechnologies/orientdb/issues/6324
https://github.com/orientechnologies/orientdb/issues/6531

and I agree with both.  Hopefully you can at least have the lifecycle callbacks.  Luckily I only use OServer and use other means to connect remotely.
Reply all
Reply to author
Forward
0 new messages