New bean creation and injection uses the @New annotation as the
@Qualifier
for the injection point.
The @New annotation injects a new instance of a bean to
the injection
point. The configuration for the @New instance is separate
from any
simple bean configuration.
- Initializer methods and injected fields are defined by annotations.
- Interceptor bindings are defined by annotations.
- Scope is
@Dependent
- Deployment type is
@Standard
- The binding is @New
- No bean
@Named
- No
@Stereotypes
- No
@Observer
methods,
@Produces
methods, or
@Disposes
methods
example: @New injection
class MyBean {
@New
private SubBean _bean;
}