This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A newbie's question: What functionality is put in EJBs, what in bus. classe?  RSS feed

 
Benjamin Weaver
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a newbie to EJB and had the following question:
What logic should be put in, for example, a session bean? Does a bean do more than handle requests, delegate those requests to business or utility classes, and return the results to the EJB client?
In other words, is an EJB in functionality something like a control servlet (except of course that responds to remote RMI and JNID calls to its interface?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session beans are generally used for exposing business logic encapsulated with a transactional context and security checks. People often delegate the actual business logic to plain old Java objects in order to facilitate easier testing. The bean shouldn't contain thousands of lines of code anyway...
 
Mushtaq Ahmed
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far Functionality is concerned.
1.Servlet is used for writing Control logic
2.Session bean is used for handling Business logic.
3.Entity bean represents data (It maps to a record in database)
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's about it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!