Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Should session beans go it alone?  RSS feed

 
Med Shabe
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I�m dealing with a non-jdbc compliant database on mainframe and cannot utilize Entity beans in my application (I use a middleware for performing transactions between web and the mainframe). Having said that, is there a value in using session beans for handling business logic, or should I just stick to JSP, Servlet model?
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should still incorporate the business logic in session beans. Logic in Servlets/JSP is not reusable and defeats the purpose of shared, reusable business components.
Use the DAO pattern to encapsulate non-JDBC data access. Since DAO's are POJOs, you may want to just wrap it in another SessionBean so that you can make use of container managed transactions and other goodies...
 
Med Shabe
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ajith for the reply,
I agree with the first part of your response about reusability topic, however I got hung up on the second part:
... you may want to just wrap it in another SessionBean so that you can make use of container managed transactions and other goodies...

How can I take advantage of container managed transaction if I'm not hitting against the db directly?
Appreciate your support.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!