Re: LDAP Annotation and Database Hashing Proposal
On Mon, Jul 24, 2017 at 10:56 AM, Will Hopkins <will.hopkins@...> wrote:
The reason I passed them into each method was so they could have deferred values, and the runtime can then transparently resolve them.
Also, since the CDI bean is fetched from CDI with each call (since we don't know the scope), if we use an init method, the implementation would always see two calls in succession:
So that wouldn't make the difference we may think it makes.
I did experimented with another solution, and that's making a CDI Producer available so the parameters can be injected into the implementation. This producer could be either RequestScoped (so we can allow deferred values still, albeit resolved once per request), or ApplicationScoped (wouldn't really allow for deferred values).
This is also possible, but it does add a little more spec text than a simple extra parameter in an interface, which is why I went with the latter option initially.