Java API remote actors supervision problem
I have code like this: ActiveObjectConfigurator manager = new ActiveObjectConfigurator(); manager.configure( new RestartStrategy(new AllForOne(), 5, 10000, new Class[] {Exception.class}), new Component[] { new Component( PingActor.class, new LifeCycle(new Permanent()), 1000 ,new RemoteAddress("MY_IP", 9999) ), new Component( PongActor.class, new LifeCycle(new Permanent()), 1000 ,new RemoteAddress("MY_IP", 9998) ) }).supervise(); PingActor pingActor = manager.getInstance(PingActor.class); PongActor pongActor = manager.getInstance(PongActor.class); pingActor.startPinging(pongActor); PongActor throws exception: public void pong() throws Exception{ if(i++==10){ throw new Exception(); } PingActor ping = (PingActor) context.getSender(); ping.ping(); } When my actors are local everything work fine, actors are restarted. But when actors are remote, exception is thrown but actors are not restarted. So how can I create supervision for remote actors?
Leave a comment
on 2010-07-14 07:43 *
By Jonas Bonér
Assigned to changed from jboner to -none-
Status changed from Accepted to New
on 2010-08-12 05:12 *
By viktorklang
Go Jonas!