Auto World sample

The Auto World sample includes an enterprise application and an EJB project. The EJB project includes EJB 2.0 entity beans with container-managed persistence (CMP) that are built using root/leaf inheritance. Vehicle is the root enterprise bean from which all of the leaf enterprise beans are derived. The leaves include RaceCar, Bus and SUV. In addition, the Auto World example includes one-to-many relationships for Garage and MotorVehiclePart, and a custom composer for VapUSPhoneNumber (an entity field of Vehicle).Finders are used on all enterprise beans to find all instances of the persistent objects.

The Auto World example includes the following enterprise beans:

  • Vehicle: the root enterprise bean whose CMP fields include: id, dateAcquired, and cellphone
  • Automobile: inherits from Vehicle and adds CMP field: numberOfAirBags
  • RaceCar: inherits from Automobile and adds CMP field: topSpeed
  • Bus: inherits from Vehicle and adds CMP field: maximumPassengers
  • Truck: inherits from Vehicle and adds CMP fields: maximumLoad, numberOfWheels
  • SUV: inherits from Truck but adds no additional CMP fields
  • Garage: has a one-to-many association with Vehicle and contains the following CMP fields: id, capacity
  • MotorVehiclePart: has a many-to-one association with Vehicle and contains the following CMP fields: partId, description

Importing this project takes approximately 1 minute. Configuring this project to run on a server takes approximately 30 minutes.

After you import this sample, click the Setup Instructions link for steps describing how to run the Auto World sample on a server.

Time icon    Import and configure: 30 minutes
Setup icon    Setup instructions
Import icon    Import the sample