There is lot of information about Stateless, Stateful and Sigleton beans everywhere but almost nothing about javax.annotation.ManagedBean. At a first look I assumed that It's be similar to Spring's @Component
but I can't use it without complete information.
- If I annotate a class with
@javax.annotation.ManagedBean
will it be singleton or it will have instance pool like stateless? - Will the methods inside such class be concurrent? I should make sure as in a singleton they are synchronized by default.
- I was thinking of annotating my DAO class with this but the
@javax.enterprise.context.*;
scopes put me doubt. I think@Stateless
will be better. Any comments? - If not on DAO or service classes, where does this annotation fit in?
This answer gives very good explanation but doesn't answer the above questions.