I know this is a Sun exam, and they would probably like to see the use of entity beans to represent Customer and Flight, but in reality, entity beans, especially read/write EJB's, are not a good idea for a production environment; they are simply too heavy in weight in nature. I know because I implemented them at my company. We thought that by using read-only and non-transactional entity beans we would increase the response time, but we observed a considerable decrease in performance instead, so we decided against them.
Did anyone NOT use entity beans and pass part II? This would be a good indicator as to how anal the examiners at Sun can be! Tee-hee! :-D
Joined: Mar 18, 2004
For read-only and non-transactional data, use of "Fast Lane Reader" pattern, that uses DAO instead of Entity Beans, is recommended. I agree, use of entity beans, in such scenarios, is not good design solution and can incur performance problems. You may find more information about Fast Lane Reader here http://java.sun.com/blueprints/patterns/FastLaneReader.html