Hello, In my actor's code, I'd like to know the reason why the postStop() hook is called. In particular I'm interested in knowing whether the actor is being terminated due to the supervision process (because one of the siblings has failed -- in which case an instance of the original exception would be fantastic!), or as result of somebody intentionally stopping it via a call to the ActorContext.stop() on the self, or parent, or parent of parent... or ActorSystem.stop() method.
In case of the former the actor might choose to perform certain actions like a transaction rollback, sending a NACK to a network connection, trigger a compensation process, and stuff like that, whereas the latter would result in a commit, or an ACK, or success message in the log file, or whatever else the actors normally do in the postStop(). I'm wondering how can I implement something like that? Or, what's the alternative? Thanks Andrey PS. In general, I think it would sometimes be useful to able to pass along with a stop() call some additional context for use in the postStop() hook of the Actors being stopped. postStop() could take an Optional parameter similar to how preRestart() does 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
