public interface CDI11Bootstrap extends Bootstrap
Bootstrap which allows weld to perform type discovery as required by CDI 1.1. Each EE7-compatible
integrator should use this interface.
Application container initialization API for Weld.
To initialize the container you must call, in this order:
#startExtensions()#startContainer()Bootstrap.startInitialization()Bootstrap.deployBeans()Bootstrap.validateBeans()Bootstrap.endInitialization()Bootstrap.shutdown()| Modifier and Type | Method and Description |
|---|---|
TypeDiscoveryConfiguration |
startExtensions(Iterable<Metadata<javax.enterprise.inject.spi.Extension>> extensions)
The container bootstrap sequence begins with initializing extensions.
|
deployBeans, endInitialization, getManager, loadExtensions, parse, parse, parse, shutdown, startContainer, startInitialization, validateBeansTypeDiscoveryConfiguration startExtensions(Iterable<Metadata<javax.enterprise.inject.spi.Extension>> extensions)
The container bootstrap sequence begins with initializing extensions. The container performs the following actions:
ProcessAnnotatedType observer methods defined on the extensions and enumerates the
set of annotations which these observer methods require using the WithAnnotations annotation. This final set is
available through TypeDiscoveryConfiguration.getAdditionalTypeMarkerAnnotations()BeforeBeanDiscovery event which allows extensions to register scopes. The container
combines the registered scopes with scopes associated with the built-in contexts and makes the resulting set available
through TypeDiscoveryConfiguration.getKnownBeanDefiningAnnotations()Afterwards, an EE7-compatible integrator performs type discovery in the following locations:
These locations are referred to as available archives hereafter.
Firstly, the integrator discovers every Java annotation annotated with Scope or NormalScope and combines
these annotations with the annotations returned from TypeDiscoveryConfiguration.getKnownBeanDefiningAnnotations()
. The resulting set is referred to as bean defining annotations hereafter.
Secondly, the integrator processes available archives according to these rules. The rules are exclusive.
beans.xml file and the file either does not contain the
bean-discovery-mode attribute or its value is set to all, this archive is an explicit bean
archive. For each explicit bean archive the integrator creates an instance of BeanDeploymentArchive
representing this archive. The BeanDeploymentArchive.getBeanClasses() method returns a collection of all types
present within the archive. Filtering rules defined in BeansXml.getScanning() are not required to be applied by
the integrator and are applied later on by Weld. The BeanDeploymentArchive.getEjbs() method returns a collection
of EJB descriptors for EJBs present in the archive. The CDI11BeanDeploymentArchive.getAdditionalTypes() method returns
an empty collection for an explicit bean archive.beans.xml file and the bean-discovery-mode attribute is set to
annotated or if the archive does not contain the beans.xml file but the archive contains types
annotated with a bean defining annotation or session beans or types annotated with a required annotation, this archive is
an implicit bean archive. For each implicit bean archive the integrator creates an instance of
BeanDeploymentArchive representing this archive. The BeanDeploymentArchive.getBeanClasses() of the bean
archive returns all the types found in the archive which are annotated with a bean defining annotations or are Session
bean definitions. Filtering rules (BeansXml.getScanning()) are not required to be applied by the integrator. The
BeanDeploymentArchive.getEjbs() method returns a collection of EJB descriptors for Session beans present in the
archive. The CDI11BeanDeploymentArchive.getAdditionalTypes() method returns a collection of types present in the
archive which are not contained within BeanDeploymentArchive.getBeanClasses() (are not annotated with a
bean-defining annotation nor define a Sesion bean) but contain a required annotation.beans.xml file and does not contain a type annotated with a bean
defining annotation and does not contain a type containing a required annotation, this archive is not a bean archive and
the integrator does not need to create a BeanDeploymentArchive instance for this archive.beans.xml file and the bean-discovery-mode attribute is set to
none, the archive is not a bean archive. The integrator does not need to create a
BeanDeploymentArchive instance for this archive.extensions - discovered CDI extensionsCopyright © 2008-2013 Seam Framework. All Rights Reserved.