Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] Big ticket items for Servlet 6 / Jakarta EE 10?

Hi,

On Wed, Sep 2, 2020 at 11:52 PM Stuart Douglas <sdouglas@xxxxxxxxxx> wrote:
We just use the provided instance, no CDI involved.

If the Class is passed in rather than an instance then the behaviour depends on if the class has a bean defining annotation. If it does then we use the bean, if not we use the constructor.

I see. Yes, this could work. In Faces we did something quite similar. We added an extra attribute to the existing annotation to switch the behaviour instead of using a bean defining annotation, but otherwise the approach sounds very much the same.

As mentioned, new bean via reusing existing type is largely a stylistic choice with some different tradeoffs.

Kind regards,
Arjan

Back to the top