Except strictly JEE-oriented features, what CDI features make sense on JSE either? Any examples available? Thanks!
Well, the one mentioned in the Weld documentation:
In addition to improved integration of
the Enterprise Java stack, the
"Contexts and Dependency Injection for
the Java EE platform" specification
also defines a state of the art
typesafe, stateful dependency
injection framework, which can prove
useful in a wide range of application
types. To help developers take
advantage of this, Weld provides a
simple means for being executed in the
Java Standard Edition (SE) environment
independently of any Java EE APIs.
When executing in the SE environment
the following features of Weld are
available:
- Managed beans with @PostConstruct and @PreDestroy lifecycle callbacks
- Dependency injection with qualifiers and alternatives
- @Application, @Dependent and @Singleton scopes
- Interceptors and decorators
- Stereotypes
- Events
This obviously makes sense in a Java SE context.