This answered it. So validation goes before persist, and notify in handler
after persist. What about exception?

How can the actor sending the command reveice an persist exception or some
other failure with the command.?

On Tue, Jun 9, 2015 at 11:21 AM Anders Båtstrand <[email protected]> wrote:

> Hi
>
> If the command is ChangePassword, I would typically validate the password
> requirements before calling persist. Inside the handler I would notify the
> client and other interested parties of the change.
>
> I don't know if that answered your question, but maybe it is easier if you
> provided an example?
>
> Best regards,
>
> Anders Båtstrand
>
>
> mandag 8. juni 2015 20.37.50 UTC+2 skrev Idar Borlaug følgende:
>>
>> Hi
>>
>> I am trying out persistentActor and was wondering how to respond to my
>> clients if the command is successfull or not.
>>
>> How do you catch a successfully executed command and how do you check to
>> see if it failed?
>>
>> Do you put validation in receiveCommand before persist or in the handler?
>> --
>> Idar Borlaug
>>
>>  --
> >>>>>>>>>> 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.
>
-- 
Idar Borlaug

-- 
>>>>>>>>>>      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.

Reply via email to