rework system initialization, remove remote address from LocalActorRef
- move all creation of ActorRefs into the ActorRefProvider (deadLetters, locker) - rootPath does not contain remote transport address any longer in order to start the LocalActorRefProvider before the RemoteTransport; the transport address is inserted during serialization only, which enables us later to have more than one transport available for one actor system (maybe even needed for clustering) - fix inheritance between DeadLetterActorRef and EmptyLocalActorRef - document some start-up dependencies by reordering constructor code - fix remote tests which used self.path for identifying remote actors (since that no longer includes the remote transport address)
This commit is contained in:
parent
52d6e5625d
commit
c5fc153a10
21 changed files with 225 additions and 204 deletions
|
|
@ -38,7 +38,15 @@ class NettySettings(config: Config, val systemName: String) {
|
|||
case "" ⇒ InetAddress.getLocalHost.getHostAddress
|
||||
case value ⇒ value
|
||||
}
|
||||
val Port = getInt("port")
|
||||
val Port = getInt("port") match {
|
||||
case 0 ⇒
|
||||
try {
|
||||
val s = new java.net.ServerSocket(0)
|
||||
try s.getLocalPort finally s.close()
|
||||
} catch { case e ⇒ throw new ConfigurationException("Unable to obtain random port", e) }
|
||||
case other ⇒ other
|
||||
}
|
||||
|
||||
val ConnectionTimeout = Duration(getMilliseconds("connection-timeout"), MILLISECONDS)
|
||||
|
||||
val Backlog = getInt("backlog")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue