This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Bean versus Java Class  RSS feed

 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application requirement is to design a search engine which queries the database given a search criteria and displays the results in a JSP. What is the advantage of using a Session Bean for database operations , over directly using a JDBC API to do database operations in a Java class?
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The difference is huge. The session bean is in a container, which will do mutithreading, transaction control, security control, pooling, and others for you for free. If you have 100 clients to access the database the performance is a big issue. You java class cannot handle this as well as a session bean. Also, if it is a stateful session bean, it cache the state on server side and saves traffic.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!