Hi All,
(Akka Java latest) In the constructor of an actor I’ve the following printlin
[DEBUG] [06/08/2018 21:59:49.852] [test-akka.actor.default-dispatcher-13] [akka://test/user/TestSupervisor/PharmaSupervisor/$a/TrialManager-pharma_ct_1] My path is Actor[akka://test/user/TestSupervisor/PharmaSupervisor/$a/TrialManager-pharma_ct_1#-1946840248]
all good. However, when I try (running the program as Main from bash) to get the ActorRef using actorSelection I have:
Patient::getClinicalTrialRef: going on actor selection ActorSelection[Anchor(akka://test/), Path(/user/TestSupervisor/PharmaSupervisor/*/TrialManager-pharma_ct_1)]
but the reference is empty. I am using this code:
ActorSelection selection = getContext().actorSelection(
"akka://test/user/TestSupervisor/PharmaSupervisor/*/TrialManager-"
+ trialId);
l.debug("Patient::getClinicalTrialRef: going on actor selection {} ", selection);
Timeout timeout = new Timeout(
scala.concurrent.duration.Duration.create(60, "seconds"));
Option<Try<ActorRef>> v = selection.resolveOne(timeout).value();
return v;
and v is empty. Notably, if I run it in eclipse, it works. If I remove (from the selection criteria), the akka://test/user, it finds the actor reference, but then it says that the actor does not exist.
Any idea?
Sorry for the probably naive question.