We are using Glassfish3.1, MySQL 5.5, JSF2, Servlet3.
About the application –
It’s a dashboard application, where users are not going to enter or modify any data.
It’s going to have a lot of charts, some static and some dynamic (live).
In this case, what will be the best way to get the data from the database?
Specially for the live charts, is it good enough to use Servlet and EntityManager only?
Are the transactions, and EJBs required in this case?
In JSF 2.0, there should be no need for servlets anymore. It are the managed beans which counts. You should definitely use JPA 2.0 for the database access stuff (the
EntityManageras you say it yourself). Whether to use EJB or not depends on the size of the application. If it’s small with no or very few shared business components, then EJB is maybe overkill. But other than that, you should definitely use EJB. The EJB should then in turn exclusively utilize theEntityManagerand the managed beans should exclusively use the EJB.