6.5. Our ExampleWe are going to upgrade the JAW Motors application by adding a "Buy Car" user story that uses a transaction. In addition to marking a record into the CAR table as "Sold", we'll also insert a corresponding record into the ACCOUNTING table. A Session Bean is appropriate because buying a car is an atomic transaction. The update to the CAR table and the insert into the ACCOUNTING table must both succeedif one database operation fails, the other operation rolls back. We'll take three iterations to move from a web-only application to one that uses a Session Bean for its business logic:
|