persist wasn't called from a constructor. Sorry, I should have shown this 
function definition too.

```
  def performIfActorNotLive(ar: ActorRef, f: => Unit) = {
    implicit val timeout = Timeout(Duration.create(5, TimeUnit.SECONDS))
    try {
      (ar ? Identify(1)).mapTo[ActorIdentity].map { aid ⇒
        if (aid.ref.isEmpty) f
      }
    } catch {
      case e: Throwable ⇒
    }
  }
```

Here `f` is `persistAndUpdate`, which internally calls the `persist` 
method. As you can see, the persist is being called from a future callback. 
I felt that this might have caused the ClassCastException and refactored it 
to send a command to self. Do you think that's what caused it?

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to