This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Dear friends, After learning about all the J2EE technolgies i am still sort of confused reg where to put my database access code. what is the best approach.. ? What are the guidelines & best practices ? When do i do it from Servlets + DAO ? When do i use a Stateless Session Bean to do it ? When do i use a Statefull Session Bean to do it ? When do i use a Entity Bean to do it ? Plz help me understand. Thank you very much Regards Alags
Hi, In our book, Core J2EE Patterns, we touch on these issues as part of several patterns, and as part of our J2EE refactoring section. We include a visual to support each refactoring in the book and in this case show the following sorts of structures: Servlet/JSP --> DAO Servlet/JSP --> Business Delegate --> Session Beans --> DAO Servlet/JSP --> Business Delegate --> Session Beans -----------------------\ *thisrepresentswhitespace* \__________\______Entity Beans (BMP only)-------> DAO We'll be updating this refactoring to include the Application Service pattern and others in the future. Btw, the diagram is a bit more polished in final form. ;-) Hope this helps. [ December 02, 2003: Message edited by: Dan Malks ] [ December 02, 2003: Message edited by: Dan Malks ] [ December 02, 2003: Message edited by: Dan Malks ]
<i><b>- Dan Malks</b></i><br />Co-Author of <a href="http://www.corej2eepatterns.com" target="_blank" rel="nofollow">Core J2EE Patterns: Best Practices and Design Strategis</a>