aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes When To Use Entity Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "When To Use Entity Beans" Watch "When To Use Entity Beans" New topic
Author

When To Use Entity Beans

sachin sachdeva
Greenhorn

Joined: Mar 13, 2001
Posts: 14
Hi to all
I want to know that in which case we need to opt for Entity Beans.Like in the books it is given the example of Banking Applications but i need some more practical and satisfactory answer.
Thanx
Jim Baiter
Ranch Hand

Joined: Jan 05, 2001
Posts: 532
The best source is the J2EE blueprint. Basically they state that an entity bean is a coarse-grained representation of a database record. So the entity bean should represent data whereas the session bean would represent behaviour. Haefel's book has a good example where the Cabin is an entity bean because the Cabin just represents a cabin on a cruise ship with a location, size, etc.
The TravelAgent is a session bean because the travel agent books passage for customers and is behaviour-oriented. It basically boils down to an MVC sort of pattern.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When To Use Entity Beans
 
Similar Threads
Question on EJB
can I ommit the ServiceLocator from the component diagram?
Granularity for entities
J2EE Design Question -- Am I On The Right Track?
JPA Delete Entity and Refresh Collections containing Entity