An ActorSystem is a heavyweight object so create only one per logical
application.
You can put it inside a trait and can resue it.
trait ActorSystemHelper {
val system = ActorSystem("system")
}
On Wed, Sep 10, 2014 at 9:58 PM, Akka Team <[email protected]> wrote:
>
> Just start one, and not many of them... :-)
> `val sys = ActorSystem()`
>
> If you're in play or spray you already have one running probably mind you.
>
> On Wed, Sep 10, 2014 at 5:18 PM, <[email protected]> wrote:
>>
>> Hello All,
>>
>> Can anyone tell me that how i can create only one ActorSystem & reuse it for
>> all my requests in application ???
>>
>> On Monday, June 11, 2012 5:58:27 AM UTC+5:30, dimgel wrote:
>>>
>>> Hi all,
>>>
>>> Since actors are stateful, I have to create an actor tree for each HTTP
>>> request I handle, right?
>>>
>>> Have I to create ActorSystem for each request too, or I can create the only
>>> one in Servlet.init(), reuse it for all (possibly concurrent) requests, and
>>> shut it down in Servlet.destroy()?
>>>
>>> Is there any recommended way of generating unique ActorSystem names if each
>>> request needs its own ActorSystem, or unique Actor names otherwise? (AFAIK
>>> names are optional and that's OK for standalone server, but anyway maybe
>>> someone came upon some guidelines about naming in distributed environment.)
>>>
>>> Thanks. =)
>>
>> --
>> >>>>>>>>>> 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.
>
>
>
>
> --
> Akka Team
> Typesafe - The software stack for applications that scale
> Blog: letitcrash.com
> Twitter: @akkateam
>
> --
> >>>>>>>>>> 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.
--
>>>>>>>>>> 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.