On Fri, Jan 14, 2011 at 16:57, Mark Struberg <struberg@yahoo.de> wrote:
Hi Dan!

The trick with the servlet is neat ;)

> If you want to know when CDI is done starting up and when application-
> scoped beans are available, that's the AfterDeploymentValidation event.
Oki, this might work in Weld and in OWB, but does the Spec really forces this for any other container too? In other words: can a developer of an Extension _really_ count on it?

I also believe it is ambiguous, so should I file a CDI spec clarification issue?

You are correct since it should be in the list under "6.7.3. Application context lifecycle" if it's supposed to be available to those observers.

(I was assuming the application-scope was available to extensions during startup because of the sentence in 11.5: "For each service provider, the container must provide a bean of scope @ApplicationScoped and qualifier @Default, supporting injection of a reference to the service provider instance. The bean types of this bean include the class of the service provider and all superclasses and interfaces." But that only means it should be available when the context is available).

-Dan

--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen