sessionscoped managed bean vs stateful ejb
问题 If I have a @ManagedBean that's @SessionScoped , why would I use a @Stateful EJB? I used it before for shopping carts and maintaining a conversational state, but since a managed bean will be kept during the user session I can store state there, then call SLSB for bussiness logic. Is that correct? If it is, then stateful ejbs will be left for more specific applications such as when you need transactions etc? 回答1: Very often stateless session beans can be used for a lot of business problems.