[hibernate-dev] Interceptors and dependency injection
Guillaume Smet
guillaume.smet at gmail.com
Thu Dec 14 08:55:40 EST 2017
On Thu, Dec 14, 2017 at 1:25 PM, Steve Ebersole <steve at hibernate.org> wrote:
> https://hibernate.atlassian.net/browse/HHH-11259 lists some other
> possibilities for things we might consider for accessing through
> ManagedBeanRegistry. We discussed Interceptor in Paris - I can definitely
> see that with some caveats/restrictions. Add it to that list or create a
> new sub-task.
Done.
> As for chaining Interceptors, I guess it depends how that is exposed. E.g.
> a comma-separated list in settings would inherently imply ordering. That
> works for SessionFactory-scoped Interceptors. I'm not sure we need a
> composite though wrapping the individual Interceptors, a List<Interceptor>
> would suffice and save some memory (granted a tiny amount). For
> Session-scoped Interceptors we would need to account for a few things, but
> its certainly possible. Supposing there are also SessionFactory-scoped
> Interceptors:
>
> How would a user indicate that the Session-scoped Interceptors should
> replace the SessionFactory-scoped ones versus adding to them. What's the
> ordering there - SessionFactory-scoped Interceptors first? Or SessionScoped
> ones>
> How would a user indicate that a Session should have no Interceptors? That
> is a common requirement.
> Probably some others I am not thinking of.
Possibly the easiest solution would be to replace them all and only
apply the Session-scoped ones if defined.
But I'm not sure I understand all the ramifications.
--
Guillaume
More information about the hibernate-dev
mailing list