Supervisor definition in Spring should accept automatic actor registration
Instead of inner definitions, we could use the actor-scan element:
This actor scanning should accept interface based, regex and pointcut scanning with filters:
<akka:supervision id="my-supervisor">
<akka:restart-strategy failover="AllForOne"
retries="3"
timerange="1000">
<akka:trap-exits>
<akka:trap-exit>java.io.IOException</akka:trap-exit>
</akka:trap-exits>
</akka:restart-strategy>
<akka:typed-actors>
*<akka:actor-scan />*
</akka:typed-actors>
</akka:supervision>
<akka:typed-actor interface="com.biz.MyPOJO"
implementation="com.biz.MyPOJOImpl"
timeout="1000"/>
<akka:typed-actor interface="com.biz.MyPOJO"
implementation="com.biz.MySecondPOJOImpl"
timeout="1000"/>
This actor scanning should accept interface based, regex and pointcut scanning with filters:
<akka:actor-scan>
<akka:include-filter type="assignable" expression="com.biz.MyPOJO"/>
</akka:actor-scan>
<akka:actor-scan>
<akka:exclude-filter type="pointcut" expression="com.biz..*POJO+"/>
</akka:actor-scan>
Leave a comment
on 2010-10-16 14:22 *
By viktorklang
What's the feature?
No need to explicitly define the actors inside the supervisor. Actors can be defined in different XML files, and the picked up by the supervisor automatically with the actor-scan element according to the specified filters (this will scan all beans in the application context and register them within the supervisor).
One use case could be having a multi-module project where actors are defined in each module, the supervisor then will take care of picking up all these actors without having to modify the supervisor definition (defining a new actor will automatically join the supervisor).
One use case could be having a multi-module project where actors are defined in each module, the supervisor then will take care of picking up all these actors without having to modify the supervisor definition (defining a new actor will automatically join the supervisor).
Should be in akka-modules.