Martin,

You can access context from anywhere in your actor, i.e. not only in receive, 
but in any other methods, because it's a member of the Actor trait. Does that 
help?

Heiko

On 26 Mar 2014, at 13:54, Martin Matusiak <[email protected]> wrote:

> Hi,
> 
> I found out about akka this week and I'm enjoying using it :)
> 
> I have a situation in which I have code running within an actor that needs to 
> send a message to another actor. The target actor is named, so I can use 
> actorSelection to look it up. But the code I need to make the call from is 
> deep in the call graph and I don't want to have to pass a reference of "self" 
> or "context" from the top level of the actor down to this location.
> 
> I want to do something like this:
> someGlobalObject.myActorSystem.actorSelection("myOtherActor") ! message
> 
> In other words, I have to be able to do this without holding an actor 
> context...
> 
> Is that possible?
> 
> 
> Thanks,
> Martin
> 
> -- 
> >>>>>>>>>> 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.


--

Heiko Seeberger
Twitter: @hseeberger
Blog: blog.heikoseeberger.name



-- 
>>>>>>>>>>      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