Thanks Patricks!
I try using the 'xxxManager' approach..

Regards
Ian

On Mon, Jan 5, 2015 at 11:00 AM, Patrick Mahoney <patr...@auvik.com> wrote:
> I have had some success instantiating and exposing ActorRef vals within an
> extension - http://doc.akka.io/docs/akka/snapshot/scala/extending-akka.html.
> This works well for actors that should be singletons within a given
> ActorSystem - you get this from extensions.
>
> -Patrick
>
> On 29 December 2014 at 16:19, Ian Holsman <i...@holsman.com.au> wrote:
>>
>> Hi.
>>
>> I was wondering what the best practice was for finding a running
>> instance of an certain class of actor. (say 'bank account')
>>
>> Currently I have a BankAccountManager which creates a new bank
>> account, and uses a map to store my reference # with the actorRef.
>>
>> I then use a 'GetAccountById' message to lookup the actorRef  on the
>> BankAccountManager actor and pass it back to the caller. who then
>> interacts with the bank account. (which seems pretty Kludgy to me).
>>
>>
>> I recently came across the 'context.actorSelection' call, and was
>> wondering if I should be using this instead to find it, and if this is
>> the preferred way of dealing with finding actors.
>>
>> ie. never hold-on to ActorRefs, and just use actorSelection to find them.
>>
>> or is there a better pattern I should be using.
>>
>> Thanks!
>> Ian
>>
>>
>> --
>> Ian Holsman
>> i...@holsman.com.au
>> PH: + 61-3-9028 8133 / +1-(425) 998-7083
>>
>> --
>> >>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
>>>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.



-- 
Ian Holsman
i...@holsman.com.au
PH: + 61-3-9028 8133 / +1-(425) 998-7083

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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