I have a domain object called VehicleRecordthat is a sleep object. CRUD operations on these VehicleRecords are processed through an object access object implemented as a non-bean session.
@Local
interface VehicleRecordEao {
void add(VehicleRecord record);
List<VehicleRecord> findAll();
...
}
@Stateless
class HibernateVehicleRecordEaoBean implements VehicleRecordEao { ... }
From a business level perspective, deleting and adding these records is more than just a CRUD operation. For example, there may be registration and security requirements. To provide these operations for customers, beans sessions are created at the business level.
@Local
interface VehicleRecordManager {
void createVehicleRecord(VehicleRecord record);
List<VehicleRecord> findAll(String make, String model);
...
}
@Stateless
class VehicleRecordManagerBean {
public void createVehicleRecordManager(VehicleRecord record) {
}
...
}
Controllers work between the presentation layer and the above business layer to get the job done, conversion between presentation objects (e.g. forms) and objects as needed.
- (). "", , EJB- , , . EJB, OO, "" "" "", .
beans , , ? beans? Eao - beans ?
, , .