From 4b8a73cc7f2dad6c4f247920f751b5a5fe41300d Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Tue, 11 Sep 2012 09:28:05 +0200 Subject: [PATCH] Add comment about attachChild --- .../src/main/scala/akka/routing/RemoteRouterConfig.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/akka-remote/src/main/scala/akka/routing/RemoteRouterConfig.scala b/akka-remote/src/main/scala/akka/routing/RemoteRouterConfig.scala index 73bf6948fe..92d208092e 100644 --- a/akka-remote/src/main/scala/akka/routing/RemoteRouterConfig.scala +++ b/akka-remote/src/main/scala/akka/routing/RemoteRouterConfig.scala @@ -75,6 +75,10 @@ class RemoteRouteeProvider(nodes: Iterable[Address], _context: ActorContext, _re IndexedSeq.empty[ActorRef] ++ (for (i ← 1 to nrOfInstances) yield { val name = "c" + childNameCounter.incrementAndGet val deploy = Deploy("", ConfigFactory.empty(), props.routerConfig, RemoteScope(nodeAddressIter.next)) + + // attachChild means that the provider will treat this call as if possibly done out of the wrong + // context and use RepointableActorRef instead of LocalActorRef. Seems like a slightly sub-optimal + // choice in a corner case (and hence not worth fixing). context.asInstanceOf[ActorCell].attachChild(props.withDeploy(deploy), name, systemService = false) })