[webbeans-dev] Lifecycle for WebBeans SE Module
Pete Muir
pmuir at redhat.com
Wed Sep 23 05:57:20 EDT 2009
I would do this inside the SE bootstrap code, as this is a requirement
that is only applicable to the SE case (other container provide a
mechanism for this such as the contextInitialized event in Servlet).
Are you concerned about portability between CDI implementations or
between types of app (SE -> Servlet -> EE)?
On 23 Sep 2009, at 05:47, Peter Royle wrote:
> Hi,
>
> So does anyone think it might be generally useful to add a simple
> lifecycle event which fires once the contexts are active and can be
> observed by regular CDI beans? This would simplify the use case of
> performing application-specific, non-cdi-extending startup events (ie:
> _NOT_ things like registering new kinds of beans or injection points),
> while allowing the observing method to take full advantage of all the
> features of CDI.
>
> Also, obviously, it would give the SE module its portable startup hook
> back.
>
> Or is there already a reason why this isn't such a good idea?
>
> Cheers
>
> Pete.
>
>
> On Tue, 2009-09-22 at 20:53 -0400, Gavin King wrote:
>> On Tue, Sep 22, 2009 at 8:38 PM, Peter Royle
>> <howardmoon at screamingcoder.com> wrote:
>>
>>> Related question: How is application code written for CDI supposed
>>> to
>>> execute code on startup - does it have to register an Extension and
>>> execute without any contexts/injection?
>>
>> Yes, the solution for startup-time instantiation of objects is to
>> make
>> them Extensions.
>>
>>
>>
>
> _______________________________________________
> webbeans-dev mailing list
> webbeans-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/webbeans-dev
More information about the weld-dev
mailing list