Hi Volcan,

On Sun, 17 Apr 2022 at 22:42, Volkan Yazıcı <vol...@yazi.ci> wrote:

>    1. I was working on LOG4J2-3082 (support external serializers, e.g.,
>    Jackson, in JTL) and there I needed `@RequiredClass`. Ralph already
>    implemented this in `master`, I just need to copy it to `release-2.x`,
>    after all it is just a `@ConstraintValidator`, right? Right... But it
>    simply won't work. Because JTL, as `PatternLayout`, uses
> `PluginManager` to
>    load plugins and that doesn't support `@ConstraintValidator` et al.?!
> I've
>    discussed this with Matt and we came to the conclusion that porting the
> new
>    plugin infra from 3.x to 2.x is easier compared to fixing the problem in
>    2.x.
>

Maybe this can be solved in other ways. For example we could have a:
1. `SerializerFactory` with multiple implementations each one in a separate
module,
2. You use the `ServiceLoaderUtil` to find an implementation or you use the
internal one if there are none.

I think that the dependency injector is a feature that should stay in 3.0
to motivate people to move from 2.x.

Piotr

Reply via email to