/
typed-actor-config.xml
83 lines (72 loc) · 3.29 KB
/
typed-actor-config.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:akka="http://akka.io/schema/akka"
xmlns:beans="http://www.springframework.org/schema/lang"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://akka.io/schema/akka
http://akka.io/akka-2.0.3.xsd">
<akka:typed-actor id="simple-typed-actor"
interface="akka.spring.foo.IMyPojo"
implementation="akka.spring.foo.MyPojo"
timeout="1000"/>
<bean id="myPojoBean" class="akka.spring.foo.MyPojo" scope="prototype"/>
<akka:typed-actor id="simple-typed-actor-of-bean"
interface="akka.spring.foo.IMyPojo"
ref="myPojoBean"
timeout="1000"/>
<akka:typed-actor id="simple-typed-actor-long-timeout"
interface="akka.spring.foo.IMyPojo"
implementation="akka.spring.foo.MyPojo"
timeout="10000"/>
<akka:typed-actor id="typed-actor-callbacks"
interface="akka.spring.foo.IMyPojo"
implementation="akka.spring.foo.MyPojo"
timeout="2000">
</akka:typed-actor>
<akka:typed-actor id="remote-typed-actor"
interface="akka.spring.foo.IMyPojo"
implementation="akka.spring.foo.MyPojo"
timeout="2000">
<akka:remote host="localhost" port="9990"/>
</akka:typed-actor>
<akka:typed-actor id="remote-service1"
interface="akka.spring.foo.IMyPojo"
implementation="akka.spring.foo.MyPojo"
timeout="1000">
<akka:remote host="localhost" port="9990"/>
</akka:typed-actor>
<akka:dispatcher id="dispatcher1" type="executor-based-event-driven" name="myDispatcher">
<akka:thread-pool queue="bounded-array-blocking-queue"
capacity="100"
fairness="true"
core-pool-size="3"
max-pool-size="40"
keep-alive="2000"/>
</akka:dispatcher>
<akka:supervision id="supervision1">
<akka:restart-strategy failover="AllForOne" retries="3" timerange="1000">
<akka:trap-exits>
<akka:trap-exit>java.io.IOException</akka:trap-exit>
<akka:trap-exit>java.lang.NullPointerException</akka:trap-exit>
</akka:trap-exits>
</akka:restart-strategy>
<akka:typed-actors>
<akka:typed-actor interface="akka.spring.foo.IFoo"
implementation="akka.spring.foo.Foo"
lifecycle="permanent"
timeout="1000"/>
<akka:typed-actor interface="akka.spring.foo.IBar"
implementation="akka.spring.foo.Bar"
lifecycle="permanent"
timeout="1000"/>
<akka:typed-actor interface="akka.spring.foo.IMyPojo"
implementation="akka.spring.foo.MyPojo"
lifecycle="temporary"
timeout="1000">
</akka:typed-actor>
</akka:typed-actors>
</akka:supervision>
</beans>