• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Should session beans go it alone?

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic