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:
Roland 2012-01-27 12:14:28 +01:00
parent 52d6e5625d
commit c5fc153a10
21 changed files with 225 additions and 204 deletions

View file

@ -9,7 +9,7 @@ import akka.util.ReflectiveAccess
import scala.util.DynamicVariable
import com.typesafe.config.Config
import akka.config.ConfigurationException
import akka.actor.{ Extension, ActorSystem, ExtendedActorSystem }
import akka.actor.{ Extension, ActorSystem, ExtendedActorSystem, Address }
case class NoSerializerFoundException(m: String) extends AkkaException(m)
@ -27,6 +27,12 @@ object Serialization {
*/
val currentSystem = new DynamicVariable[ActorSystem](null)
/**
* This holds a reference to the current transport address to be inserted
* into local actor refs during serialization.
*/
val currentTransportAddress = new DynamicVariable[Address](null)
class Settings(val config: Config) {
import scala.collection.JavaConverters._