Hello there Andriy,
I think Christian on StackOverflow has already answered most questions 
already :-)

As for the the “initialization dance” going on with Actors - there’s a few 
patterns that can help: 
http://doc.akka.io/docs/akka/2.3.1/scala/actors.html#initialization-patterns
But in general - yes, you will have to either pass ActorRefs around through 
constructors (prefered way) of special “initializing messages” (see 
http://doc.akka.io/docs/akka/2.3.1/scala/actors.html#initialization-via-message-passing).

If you have any more specific questions please let me know :-)


One hint right away though, if you’d rather have an explicit “initializing 
phase” in Actors, a popular pattern is to use the become method ( 
http://doc.akka.io/docs/akka/2.3.1/scala/actors.html#become-unbecome ) :

def receive = initializing

val initializing: Actor.Receive = {
  case x: Thing => 
    this.thing = x
    become(ready)
}

val ready: Actor.Receive = {
   case _ => // ...
}

-- 
Konrad

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to