title: Akka actor survive restarts?
body: <p>I have an issue with akka AbstractPersistentFSM in surviving after restart, if I try to access the already existing actor instance after restart, I get error.
  I want to configure the actor to survive restart. please share with me any java samples that can continue working after restarts.</p>
  
  <p>Complete example in this [repository] : 
  <a href="https://github.com/ihabyousif/akka/tree/Akka/AkkaFSMSample/src/main/java/com/fsm/sample" rel="nofollow noreferrer">https://github.com/ihabyousif/akka/tree/Akka/AkkaFSMSample/src/main/java/com/fsm/sample</a> repository!</p>
  
  <p>The issue is when I create actor with </p>
  
  <pre><code>ActorSystem actorSystem = ActorSystem.create("SwitchApp");
      SwitchData switchData = new SwitchData("sample string to test presistance");
  String persistenceId = "switch_1111"; 
  
  ActorRef ref = actorSystem.actorOf(SwitchPresistedFsm.props(persistenceId, switchData),persistenceId);
  </code></pre>
  
  <p>and restart the application and run </p>
  
  <pre><code>ActorSelection actorSelection = actorSystem.actorSelection("switch_1111");
  actorSelection.tell( new SwitchPresistedFsm.InprogressCommand(), null);
  </code></pre>
  
  <p>it will give an error, this means that I lost the data that was in the first actor and didn't survive during restarts.</p>
  
  <p>I need to find the same object with the same data and state after restart, how it can be handled in this simple example.</p>
  
  <p>please feel free to change in the GIT sample.</p>