A couple of questions about domain object validation:
1. What is the separation of concerns argument for keeping validation outside of a domain object (but still within the domain layer)? It seems like that breaks good OOD encapsulation. To quote J2EE Development Without EJB: "However, the principle of separating validation rules from the validated objects is important." p. 377. Why shouldn't my domain objects implement the Validator interface?
2. What is the best way to implement domain object validation within the Spring framework? The Spring documentation on this topic is disturbingly sparse. There seems to be a lot of interest in presentation layer validation and documenting how to integrate Apache Commons Validator, but not a whole lot on how to actually implement validation at the domain object level using what seems to be an otherwise brilliantly simple implementation of validation within org.springframework.validation. I don't need declarative validation and frankly, Chapter 4 of the reference documentation is pretty weak. I just want simple validation at the domain object level for batch processing(:shock that doesn't involve a GUI.