attachChild in ClusterRouteeProvider also, see #2485

This commit is contained in:
Patrik Nordwall 2012-09-10 13:13:59 +02:00
parent f746115c4d
commit 2e537af78a

View file

@ -30,6 +30,7 @@ import akka.routing.Router
import akka.routing.RouterConfig
import akka.routing.RemoteRouterConfig
import akka.actor.RootActorPath
import akka.actor.ActorCell
/**
* [[akka.routing.RouterConfig]] implementation for deployment on cluster nodes.
@ -121,8 +122,7 @@ private[akka] class ClusterRouteeProvider(
} else {
val name = "c" + childNameCounter.incrementAndGet
val deploy = Deploy("", ConfigFactory.empty(), routeeProps.routerConfig, RemoteScope(target))
impl.provider.actorOf(impl, routeeProps, context.self.asInstanceOf[InternalActorRef], context.self.path / name,
systemService = false, Some(deploy), lookupDeploy = false, async = false)
context.asInstanceOf[ActorCell].attachChild(routeeProps.withDeploy(deploy), name, systemService = false)
}
// must register each one, since registered routees are used in selectDeploymentTarget
registerRoutees(Some(ref))