Syed,
Here are a few responses the questions you posed:
* In a plain JSF/EJB 3/JPA application, JPA entities or EJB session beans cannot be managed backing beans. However, if you are using
JBoss Seam with JSF, you can use both JPA entities and EJB session beans directly in JSF. I have doe this and have gotten very good feedback from developers in terms of usability and productivity. However, even while using Seam, it is sometimes obvious that you still need a separate backing bean to handle some presentation tier logic that really is not a good idea to be in an EJB that's supposed to be agnostic of the view technology you are using. Seam doesn't stop you from doing that when it's needed.
* Using a DTO is not really necessary in
Java EE 5. Not having it usually cuts down on a lot of redundant code.
* It is very true that the entity manager API makes the DAO layer obsolete in many cases. What I have found is that DAOs are a still a good idea to abstract JPQL code. This is especially true since you are designing a mid-sized application that might change it's persistence technology over time. EJB 3.0 session beans are very well-suited to a robust DAO layer since they are just POJOs, injectable, thread-safe, transactional and pooled.
* I recommend avoiding JNDI look-up as much as possible and just sticking with @EJB/@Resource (it is standard). The only place JNDI is really a good choice is for
JSP. Everywhere else, injection many be used (including
unit tests, utility classes, application clients and the like). If and when needed, you can utilize Spring for enhanced DI:
http://www.ctjava.org/camp2008/sessionB.jsf?cid=1952 (or Seam DI features, Guice, etc).
Do let me know if you would like any of the above clarified.
Regards,
Reza