Use a coarse-grained interface to manage interactions between fine-grained or coarse-grained and dependent objects internally.
The Composite Entity is a coarse-grained entity bean. It may be the coarse-grained object or hold a reference to the coarse-grained object. Also known as Aggregate Entity.
Where to use & benefits
- Combine coarse-grained object and its related dependent objects into a single entity bean.
- Multiple clients share persistent objects.
- Model a network of related business entities.
- In both local and distributed environment, use remote entity beans to model dependent business objects or fine-grained objects.
- Improve performance by eliminating the parameter and return value serialization and data transmission costs.
- Eliminate inter-entity relationships
- Improve manageability by reducing entity beans.
- Improve network performance
- Reduce database schema dependency
- Increase object granularity
- Facilitate composite transfer object creation.
- Overhead of multi-level dependent object graphs.
- Related patterns include
- Transfer Object used to return to client and also used to serialize the coarse-grained and dependent objects tree, or part of the tree, as required.
- Session Facade used to manage the inter-entity-bean relationships.
Return to top