This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes entity bean,session bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "entity bean,session bean" Watch "entity bean,session bean" New topic

entity bean,session bean

Vandiyadevan senthan
Ranch Hand

Joined: Nov 11, 2003
Posts: 37
Dear All,
When could one use entity bean?when could one use session Bean?can we use entity bean with session bean at which situation?
your help is highly appreciated!!!
vandiyadevan senthan.
Sri Basavanahally
Ranch Hand

Joined: Oct 07, 2003
Posts: 75
You can use Entity Beans to create an object-relational mapping. It boils to doing database access via objects.
Session Beans are used for business methods (calculate interest rates, for example). You could use a combination of session and entity beans, if you want.
A lot of people stay away from entity beans(including me...) and just use session beans, but, entity beans are good and are used quite a bit. You may want to read up on EJB design patterns to learn more about how and when to use the two types.

Vandiyadevan senthan
Ranch Hand

Joined: Nov 11, 2003
Posts: 37
Dear Sri Basavanahally,
Thank you very much for your reply.
I agree. Here's the link:
subject: entity bean,session bean