- The domain objects have all been specified via interfaces
- Q: How do we get a domain object so that we can use it?
- A: Factory objects, known as home objects in EJB
- Q: Why not just instantiate an instance of an implementation class?
- A: The system is intended to be distributed
- When you allocate an instance, the instance resides within your VM
- In a distributed system the instance may reside in a different process or even on a different machine
- Must communicate with an object in the target VM and have it do the instantiation
- In EJB these objects are called home objects
- There is a home interface for each EJB type
|