You can still benefit from Dependency Injection and keep supervision 
working. For example my project: 
AkkaGuice: https://github.com/chanan/AkkaGuice

You can choose to inject a fully formed actor into your code (with all its 
dependencies resolved) which will indeed only give you a top level actor, 
but you can also use the PropsContext which will give you the resolved 
props of an actor to be used as a child actor.

Chanan. 

On Monday, May 4, 2015 at 5:04:46 AM UTC-4, Akka Team wrote:
>
> Hi Harit,
>
> Dependency injection as it is implemented by these frameworks is not as 
> useful with Akka, since actor creation must be always controlled by Akka 
> itself (otherwise supervision would not work). Nevertheless, this post 
> contains some pointers:
>
> http://letitcrash.com/post/55958814293/akka-dependency-injection
>
> -Endre
>
> On Sat, Apr 25, 2015 at 5:52 PM, Harit Himanshu <[email protected] 
> <javascript:>> wrote:
>
>> Hello
>>
>> I am learning Akka and immediately one question popped up in my mind.
>> I use Java EE <https://docs.oracle.com/javaee/6/tutorial/doc/giwhb.html> 
>> dependency injection a lot in my projects for following reasons
>>
>>
>>    1. Inject dependencies on run time so that I can test them
>>    2. Injecting different properties (*.properties) which are usually 
>>    part of src/main/resources
>>
>> I was wondering how these mechanism are achieved in Akka or if Java EE 
>> and Akka play well together.
>>
>> Thoughts?
>>
>> Thanks a lot
>> + Harit Himanshu
>>
>> -- 
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Akka Team
> Typesafe - Reactive apps on the JVM
> 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.

Reply via email to