-
1. Re: add
jbarrez Sep 23, 2008 5:34 PM (in response to camunda)There is certainly a mismatch between the 2 ... Having the throws clause will make it cumbersome if no real Exception handling is done (95% of the cases) ... but it sure is easy when you need it...
I'll have to think about it before I can give my final answer :p -
2. Re: add
tom.baeyens Sep 24, 2008 3:22 AM (in response to camunda)there is a difference. the command is executed within a environment (read:transaction). an exception there will rollback. in this case it is a convenience so that you don't have to rethrow checked exceptions.
the service methods are exposed to the client. that is why they are different.
anyway... that is the reasoning behind it. doesn't mean it's the right thing. -
3. Re: add
jbarrez Sep 24, 2008 3:42 AM (in response to camunda)Tom, I understand the reason for the difference now... damn it's more difficult than I thought :p
But does that mean that a Command should be an internal class and that clients shouldn't use it (but the CommandService instead)?