2010-05-31 17:16:37 +02:00
|
|
|
/**
|
|
|
|
|
* Copyright (C) 2009-2010 Scalable Solutions AB <http://scalablesolutions.se>
|
|
|
|
|
*/
|
|
|
|
|
|
2010-04-05 12:32:15 +02:00
|
|
|
package sample.rest.java;
|
2009-07-12 23:08:17 +02:00
|
|
|
|
2010-07-26 18:47:25 +02:00
|
|
|
import se.scalablesolutions.akka.config.TypedActorConfigurator;
|
2010-10-18 19:30:43 +02:00
|
|
|
import static se.scalablesolutions.akka.config.Supervision.*;
|
2009-07-12 23:08:17 +02:00
|
|
|
|
|
|
|
|
public class Boot {
|
2010-07-26 18:47:25 +02:00
|
|
|
public final static TypedActorConfigurator configurator = new TypedActorConfigurator();
|
2010-05-31 17:16:37 +02:00
|
|
|
static {
|
|
|
|
|
configurator.configure(
|
2010-10-19 14:17:22 +02:00
|
|
|
new OneForOneStrategy(new Class[]{Exception.class}, 3, 5000),
|
2010-10-18 19:30:43 +02:00
|
|
|
new SuperviseTypedActor[] {
|
|
|
|
|
new SuperviseTypedActor(
|
2010-04-05 12:32:15 +02:00
|
|
|
SimpleService.class,
|
2010-08-04 10:45:29 +02:00
|
|
|
SimpleServiceImpl.class,
|
2010-10-18 19:30:43 +02:00
|
|
|
permanent(),
|
2009-08-28 17:40:06 +02:00
|
|
|
1000),
|
2010-10-18 19:30:43 +02:00
|
|
|
new SuperviseTypedActor(
|
2010-04-05 12:32:15 +02:00
|
|
|
PersistentSimpleService.class,
|
2010-08-04 10:45:29 +02:00
|
|
|
PersistentSimpleServiceImpl.class,
|
2010-10-18 19:30:43 +02:00
|
|
|
permanent(),
|
2009-07-12 23:08:17 +02:00
|
|
|
1000)
|
|
|
|
|
}).supervise();
|
2010-05-31 17:16:37 +02:00
|
|
|
}
|
2009-07-12 23:08:17 +02:00
|
|
|
}
|