title: JSR-303 bean validation with Spring and iBatis
body: <p>Is it possible with JSR-303 bean validation to write a custom annotation that can talk to a back end service?</p>
  
  <p>We accomplished this type of validation with the "old school" Spring validators. In that case, the validator was a Spring bean and could have other services injected into it. Then that validator is injected into the controller.</p>
  
  <p>An example might be an annotation (perhaps @EmailExists) to verify if an email already exists. I can only do this with a SQL query using one of our services. I would prefer to "validate" this alongside the other annotations and check it as soon as possible and not have to explicity do it in a back end service.</p>
  
  <p>NOTE: We are using iBatis/MyBatis so I can't use any JPA/Hibernate tricks :-)</p>
  
  <p>thanks!</p>