Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data access from Servlet / SLSB / SFSB/ Entity Bean ?!

 
Alagapan Thiagarajan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dan Malks
Author
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very impressive Ascii art, Dan!

Kyle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic