Cars Example

Real applications combine many of the concepts presented in this chapter. Our cars example demonstrates using a stateful and stateless session bean to model an automobile dealer and a prospective buyer. Of course, this example does not illustrate all of the required information and steps in purchasing a real car, but it does illustrate a typical design of a larger application.

The automobile dealer presents a purchasing service to the potential customer. Users need to be able to query the automobile dealer to look for cars in the dealer's stock that match their criteria. Then, the customer may make an offer on a particular car. If the dealer accepts the offer, the car is sold and removed from the dealer's stock.

Because the dealer ...

Get J2EE™ Applications and BEA™ WebLogic Server™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.