The new JSR 299, Contexts and Dependency Injection for Java EE, seems to be based on the concept of Scope.
beans are created and associated with one of the supported areas: applications, sessions (associated with an HTTP session), conversations, and requests.
Does it make sense to use CDI if there is no HTTP session (for example, an Enterprise application that provides functions through a remote EJB interface), since managed beans will not be associated with any Context (since they do not exist)?
Is it possible to use CDI in such a scenario? What benefits would he bring?
source share