remote actors with ActiveObjectConfigurator?

1 view
Skip to first unread message

Mikael Sundberg

unread,
Apr 8, 2010, 3:42:00 AM4/8/10
to akka...@googlegroups.com
Hi
im having some problems with Remote Actors and ActiveObjectConfigurator.
SimplePojo is just a serialisible class with one String field and a get/set
when i do:

        RemoteNode.start();
        SimplePojo instance = ActiveObject.newRemoteInstance(SimplePojo.class, 10000l, "localhost", 9999);
        instance.setName("nils");
        System.out.println("name: " + instance.getName());

it works

but when i use
        RemoteNode.start();
        SimplePojo instance = conf.getInstance(SimplePojo.class);
        instance.setName("nils");
        System.out.println("name: " + instance.getName());
it doesnt

configuration for the later:
    ActiveObjectConfigurator conf = new ActiveObjectConfigurator();
        conf.configure(new RestartStrategy(new AllForOne(), 3, 5000, new Class[]{Exception.class}),
                new Component[]{
                    new Component(SimplePojo.class, new LifeCycle(new Permanent()), 10000, new RemoteAddress("localhost", 9999))
                }).inject().supervise();



log:
DEB [20100408-09:35:34.296] actor: [Actor[se.rty.akka.akka_sample_java.SimplePojo:1270728910494]] has started
DEB [20100408-09:35:34.422] internal: Interceptors creation: 109ms
DEB [20100408-09:35:34.428] internal: Scopes creation: 6ms
DEB [20100408-09:35:34.437] internal: Converters creation: 9ms
DEB [20100408-09:35:34.451] internal: Binding creation: 14ms
DEB [20100408-09:35:34.452] internal: Binding indexing: 1ms
DEB [20100408-09:35:34.456] internal: Static injection: 4ms
DEB [20100408-09:35:34.456] internal: Validation: 0ms
DEB [20100408-09:35:34.457] internal: Static validation: 1ms
DEB [20100408-09:35:34.457] internal: Instance member validation: 0ms
DEB [20100408-09:35:34.459] internal: Provider verification: 2ms
DEB [20100408-09:35:34.459] internal: Static member injection: 0ms
DEB [20100408-09:35:34.460] internal: Instance injection: 1ms
DEB [20100408-09:35:34.462] internal: Preloading: 2ms
DEB [20100408-09:35:34.474] actor: [Actor[se.scalablesolutions.akka.actor.Supervisor:1270728911683]] has started
DEB [20100408-09:35:34.476] actor: [Actor[se.rty.akka.akka_sample_java.SimplePojo:1270728910494]] has started
DEB [20100408-09:35:34.478] actor: Linking actor [Actor[se.rty.akka.akka_sample_java.SimplePojo:1270728910494]] to actor [Actor[se.scalablesolutions.akka.actor.Supervisor:1270728911683]]
DEB [20100408-09:35:34.479] actor: [Actor[se.scalablesolutions.akka.actor.Supervisor:1270728911683]] has started
DEB [20100408-09:35:34.480] actor: [Actor[se.scalablesolutions.akka.actor.Supervisor:1270728911683]] has started
DEB [20100408-09:35:34.481] config: Retrieving active object [se.rty.akka.akka_sample_java.SimplePojo]


Testcase: testRemote(se.rty.akka.akka_sample_java.IntegrationTest):        Caused an ERROR
None.get
java.util.NoSuchElementException: None.get
        at scala.None$.get(Option.scala:169)
        at scala.None$.get(Option.scala:167)
        at se.scalablesolutions.akka.actor.Actor$class.registerSupervisorAsRemoteActor(Actor.scala:1037)
        at se.scalablesolutions.akka.actor.Dispatcher.registerSupervisorAsRemoteActor(ActiveObject.scala:366)
        at se.scalablesolutions.akka.actor.ActiveObjectAspect.remoteDispatch(ActiveObject.scala:290)
        at se.scalablesolutions.akka.actor.ActiveObjectAspect.dispatch(ActiveObject.scala:260)
        at se.scalablesolutions.akka.actor.ActiveObjectAspect.invoke(ActiveObject.scala:256)
        at se.rty.akka.akka_sample_java.SimplePojo$$ProxiedByAWSubclassing$$1270728910693_1__1184972270_1618486575___AW_JoinPoint.proceed(Unknown Source)
        at se.rty.akka.akka_sample_java.SimplePojo$$ProxiedByAWSubclassing$$1270728910693_1__1184972270_1618486575___AW_JoinPoint.invoke(Unknown Source)
        at se.rty.akka.akka_sample_java.SimplePojo$$ProxiedByAWSubclassing$$1270728910693.setName(Unknown Source)
        at se.rty.akka.akka_sample_java.IntegrationTest.testRemote(IntegrationTest.java:75)

Michael Kober

unread,
Apr 8, 2010, 6:52:04 AM4/8/10
to akka...@googlegroups.com
Hi,

looks like a bug to me - tested the same with spring configuration and got the same error. I'll try to dig into this, asap.

/Mike

2010/4/8 Mikael Sundberg <mikael.s...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.

Mikael Sundberg

unread,
Apr 9, 2010, 3:22:03 AM4/9/10
to akka...@googlegroups.com
I have looked some more at it and agree that it really seems like a bug.
probably obvious to someone who knows the code more then me but:
It seems like the supervisor is not told about the remote address, atleast that is never set. the remote address is correct in the activeobject, but the supervisor tries to get its remoteadress and that fails since it does None.get. when registering the supervisor as a remoteactor.

i tried to fix it but failed miserably. looking forward to see how it was supposed to be done :-)

/Micke


2010/4/8 Michael Kober <michae...@jayway.com>

Mikael Sundberg

unread,
Apr 14, 2010, 9:53:40 AM4/14/10
to akka...@googlegroups.com
Is there any ticket or progress for this? i looked but couldnt find either.
or should i create a ticket?
/Micke

2010/4/9 Mikael Sundberg <mikael.s...@gmail.com>

Jonas Bonér

unread,
Apr 14, 2010, 9:58:59 AM4/14/10
to akka...@googlegroups.com
Please do. Thanks. 

--
Jonas Bonér 

Mikael Sundberg

unread,
Apr 14, 2010, 10:13:22 AM4/14/10
to akka...@googlegroups.com
Either ticket creation is not for everyone, or i just failed at finding it.
/Micke

2010/4/14 Jonas Bonér <jo...@jonasboner.com>
Reply all
Reply to author
Forward
0 new messages