Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdi-dev] This is StillDI

----- Original message -----
From: Matej Novotny <manovotn@xxxxxxxxxx>
As to your question - you cannot really do that for two reasons:
1) The event is basically overloaded and you can have people who take it as "app started" and people who actually use it to detect the scope activation and want to perform some logic (regardless of whether it's in build or runtime)
 - the latter group can still fully leverage the event in build time
2) By moving the event to runtime you'd violate the specification that requires to fire this event when the context is initialized[1] - and you're leveraging build time approach to initialize it even before running the app.

[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__jakarta.ee_specifications_cdi_2.0_cdi-2Dspec-2D2.0.html-23application-5Fcontext&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=3azP-pEWesGfIewc5ARf-1qgBUmuZ6aE_FWKXZm3Was&m=yotqiM1A5oaA37tMzhKLuOUl-CxbzrYg1QnLCgcSnqo&s=QGRmvSsKVvJDeKFhkyUJvlFR_0uhmu4RRf-yYlMgxeE&e=
Thanks for your answers. I think the part I don't understand (which LT mentioned as well) is why the application context should be active at build time. I'd assumed that at build time you could be processing the beans in the application and synthesizing the classes needed to support them, but I hadn't imagined that you'd create any bean instances or that any contexts would be active.
 
I'm not sure whether I'm missing something fundamental about the requirements for the application context, or whether you're suggesting that users would be able to do much more at build time than I'd understood.
 
Andrew
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Back to the top