See: Description
Class | Description |
---|---|
DefaultBeanExtension |
Registers beans annotated @DefaultBean
During the ProcessAnnotatedTypePhase beans and producers annotated with @Default
have a synthetic qualifier added to them and existing qualifiers removed.
|
DefaultBeanInformation.Literal |
Annotation Type | Description |
---|---|
DefaultBean |
Annotation that signifies that a bean should only be registered if no other
instance with the same type and qualifiers is registered.
|
DefaultBeanInformation |
We use this annotation as a carrier of qualifiers so that other extensions have access to the original qualifiers of the bean
(those removed and replaced by synthetic qualifier by the
DefaultBeanExtension ). |
Allows a library to provide a default implmentation of a bean, which is used unless overridden by an application.
Although this may sound identical to an alternative, alternatives have some restrictions that may make them
undesirable. Primarily, alternatives require an entry in every beans.xml
file in an application.
Developers consuming the extension will have to open up the any jar file which references the default bean, and edit
the beans.xml
file within, in order to override the service. This is where default beans come in.
Default beans allow you to create a default bean with a specified type and set of qualifiers. If no other bean is installed that has the same type and qualifiers, then the default bean will be installed.
DefaultBean
Copyright © 2008-2013 Seam Framework. All Rights Reserved.