There is a link about the way to integrate AKKA
and Spring
. Or better say: "how to use Akka
actors in spring
environment".
http://doc.akka.io/docs/akka-modules/1.3.1/modules/spring.html
Actually there is modules
folder http://doc.akka.io/docs/akka-modules/ that exists only for 1.3.1
version.
Does it mean that there is no integration for different than `1.3.1` version
with spring?
Or it means that we should not use it (spring integration I mean)?
Or we should do it in the same way as we do it for `1.3.1` version?
As pointed out by Roland Kuhn, you keep the creation of child actors within their parents otherwise you lose the whole concept of supervision.
There is a useful post here: http://blog.nemccarthy.me/?p=272 on two approaches in 2.2 on wiring up Akka Actors with Spring using the
IndirectActorProducer
.Prior to 2.2 you could also use the
UntypedActorFactory
to do a similar thing. TheIndirectActorProducer
is a much cleaner way to do this. You could also look atCreator
: http://doc.akka.io/api/akka/2.2.0-RC1/index.html#akka.japi.CreatorThe
akka-spring
module was not ported to the Akka 2.x series because it conflicts with the way actor systems work: with parental supervision only actors create other actors, which means that Spring—not being an actor—cannot create actors.There is a new section in the documentation for the upcoming 2.2 release about how to use dependency injection while creating actors (see the docs). We are working on a more complete document describing the interplay between DI frameworks and Akka.