I am reviewing my code from since I picked up on JSF. One of the most complex issues has come up once again. The decision between CDI and EJB.
I am using three layers and I wonder which type of annotation to use on each of them: - Backing beans (the Controller as defined in MVC) - The service layer - DAO's
My backing beans are using CDI, as long as I don't need anything from EJB. But I am stuck on those other two. I remember reading about using EJB beans because of the pooling functionalities, which would prevent massive loads of requests (or attacks, if you will). So in short, is there ANY reason to use EJB (Stateless, Stateful, LocalBean et cetera), considering security or anything else (excluded ViewScoped)?
Thanks in advance.