This content has been marked as final.
Show 3 replies
-
1. Re: When to use @Stateless
thejavafreak Nov 4, 2008 12:22 PM (in response to nicolasc)@Stateless is for EJB. If you want to decouple your DAO from SLSB, then you don't put @Stateless on your DAO.
-
2. Re: When to use @Stateless
nicolasc Nov 4, 2008 1:46 PM (in response to nicolasc)Thank you for your reply.
But again, I still don't see the diference: Will both of the annotations make the compoment a Stateless component? or is the behavior in some way different?
Thanks
Nicolas -
3. Re: When to use @Stateless
gjeudy Nov 4, 2008 2:55 PM (in response to nicolasc)Both annotations will make the component stateless but @Stateless is interpreted by the EJB container for EJB3 beans and @Scope(ScopeType.Stateless) is interpreted by Seam container for seam managed beans. There it doesnt make sense to put both on the same POJO (no matter if its an EJB or a Java bean), if I were you I would choose one and stick to it.
If you don't use EJB3 on your project then the choice is easy.