System.out.println() does not operate in Akka actor

Posted by faisal abdulai on Stack Overflow See other posts from Stack Overflow or by faisal abdulai
Published on 2012-10-07T15:36:03Z Indexed on 2012/10/07 15:36 UTC
Read the original article Hit count: 290

Filed under:
|
|
|

I am kind of baffled by this encointer.

I am working an akka project that was created as a maven projecct and imported into eclipse using the mvn eclipse:eclipse command. the akka actor has the system println method just to make it easy to do read the functions and methods invoked. However any time I run the akka system, the println command does not print any thing to the eclipse console but I do not get any error messages. does any one have any idea about this. below is a code snippet.

public class MasterActor extends UntypedActor {

    /**
     * 
     */

    ActorSystem system = ActorSystem.create("container");

    ActorRef worker1;

    //public MasterActor(){}

    @Override
    public void onReceive(Object message) throws Exception {
        System.out.println(" Master Actor 5");

         if(message instanceof GesturePoints)
         {  //GesturePoints gp = (GesturePoints) message;
              System.out.println(" Master Actor 1");             
         try {      worker1.tell(message, getSelf());

             System.out.println(" Master Actor 2");
                } catch (Exception e) {
                  getSender().tell(new akka.actor.Status.Failure(e), getSelf());
                  throw e;
                }

    }
         else{ unhandled(message);}
  }  

    public void preStart()
    {
      worker1 = getContext().actorFor("akka://[email protected]:2553/user/workerActor");
    }

}

don't know whether it is a bug in eclipse.

thank you.

© Stack Overflow or respective owner

Related posts about java

Related posts about maven-3