[bv-dev] CDI interceptors and lifecycle

Emmanuel Bernard emmanuel at hibernate.org
Mon Feb 4 13:08:26 EST 2013


While reviewing the interceptor specification, I realized that
interceptors lifecycle is bound to the object lifecycle they intercept.
In other words, it is not trivial to keep caches around for example
caches that now if a method should be intercepted or not.

Is that a problem for the expected CDI interceptor implementations?
I am asking to make sure we are not making a mistake by not considering
@ValidateExecutable in BV engines.

An interceptor should either:

- explicitly be set only on the methods that should be intercepted and
  not more
- always recompute @ValidatedExecutable for every new instance of the
  targeted object
- use some third party CDI bean responsible for the caching

In other words are we good?


More information about the beanvalidation-dev mailing list