Question

I should send and wait for response using an Udp server from a Play controller. Where is the correct place to create de Actor? Local Variable or Object property?

This question come to my mind becouse working with play, when I change code in the actor play recompiles (I'm using play debug ~run), but changes are not applied, so I think I may be doing something wrong.

My actual code:

public class Application extends Controller {
  static final ActorRef server = Akka.system().actorOf(Props.create(Listener.class));

  public static Result index() {
    // ActorRef sender = Akka.system().actorOf(Props.create(SimpleSender.class));

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top