[bv-dev] BVAL-238 Dependency injection in ConstraintViolation

Gerhard Petracek gerhard.petracek at gmail.com
Tue Jan 3 15:55:22 EST 2012


hi,

i was going to suggest something similar.

we could provide a simple adapter interface with a method like:
<T> T resolveBean(Class<T> targetType)
(and if we would like to support dependent beans, we should think about an
additional dispose method.)

the only restriction is the manual usage of methods like
ValidatorContext#messageInterpolator.
however, since it would be possible to configure those parts via a
dependency injection container like cdi, it isn't a big issue.

regards,
gerhard



2012/1/3 Michael Nascimento <misterm at gmail.com>

> What about a different proposal: looking up the interface implementation
> using ServiceLoader? Then there would be nothing special about it.
>
> Regards,
> Michael
> On 3 Jan 2012 17:25, "Emmanuel Bernard" <emmanuel at hibernate.org> wrote:
>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20120103/36e39ff0/attachment-0001.html 


More information about the beanvalidation-dev mailing list