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
posted 14 years ago
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.