Entity Beans in the Auction System
  • Based on the first rule of thumb, the User, Item, and Bid objects were cast as entity beans
    • Initial Design: No session beans
    • Wait for patterns of entity bean usage to become apparent
  • Design of the interfaces for these beans was straightforward
    • Except for the inclusion of the password attributes in User
    • Interfaces driven by the requirements of the application
  • Next decision point: persistence
    • Container Managed Persistence (CMP)
      • Bean data stored automatically to underlying database
      • Dependent on deployment time creation of bean-to-database mapping
    • Bean Managed Persistence (BMP)
      • Bean responsible for storing data in database
  • BMP chosen
    • Less dependent on vendor specific database mapping features
    • Pedagogical: Some beans cannot use CMP

Next Slide >>