Fixed bug in Active Object restart, had no default life-cycle defined + added tests

This commit is contained in:
Jonas Bonér 2010-07-14 14:38:56 +02:00
parent 6ac052be04
commit 49e572d06f
4 changed files with 25 additions and 17 deletions

View file

@ -215,11 +215,15 @@ class RemoteServer extends Logging {
def shutdown = synchronized {
if (_isRunning) {
RemoteServer.unregister(hostname, port)
openChannels.disconnect
openChannels.close.awaitUninterruptibly
bootstrap.releaseExternalResources
Cluster.deregisterLocalNode(hostname, port)
try {
RemoteServer.unregister(hostname, port)
openChannels.disconnect
openChannels.close.awaitUninterruptibly
bootstrap.releaseExternalResources
Cluster.deregisterLocalNode(hostname, port)
} catch {
case e: java.nio.channels.ClosedChannelException => log.warning("Could not close remote server channel in a graceful way")
}
}
}