I currently have following Architecture:
- Managedbeans of all different scopes for Handling the View-Logic of xhtmls
- and Singletons (public static methods) for Services/DAO...
Example:
public class UserDAO {
public static void updateUser(UserModel user){
...
}
}
in Session-/ViewScoped Managed bean then:
void someMethod(){
UserDao.updateUser(user);
}
Is this the right way to build a multi-user JSF-Web-Application?
I have read that some put all business logic into a @ApplicationScoped, and some say thats not the right way. I am wondering, if Singletons can cause concurrency-issues?
As I have all Business logic in an own "Framework"-Project encapsuled (which is just a plain java-project which is used by some other apps in the same context as well) I can't just wrap Scoping-JSF-Logic around the services/Daos...
Can someone bring light into this?