]
Martin Kouba commented on CDI-572:
----------------------------------
Also what should happen if a validation fails?
support JSR-303 bean validation in CDI beans
--------------------------------------------
Key: CDI-572
URL:
https://issues.jboss.org/browse/CDI-572
Project: CDI Specification Issues
Issue Type: Epic
Reporter: Mark Struberg
Consider a bean like
{code}
@SessionScoped
public class CurrentUser {
@javax.validation.constraint.NotNull
@javax.validation.constraint.Length(10)
private String userId;
...
}
{code}
We could easily check this and invoke JSR-303 (if available) in the Producer<T>.
Please note that for a custom Producer they have to care for it themselves.