Business and Integration Tier Refactorings
Wrap Entities With Session
Entity beans from the business tier are exposed to clients in another tier.
Use a Session Facade to encapsulate the entity beans.
Figure 5.16. Wrap Entities With Session
Motivation
Entity beans are coarse-grained distributed persistent objects. Exposing the entity bean to clients in a different tier results in network overhead and performance degradation. Each client invocation on the entity bean is a remote network method call, which is expensive.
Entity beans mandate container-managed transaction. Exposing the entity bean to the clients may put the burden on the client developer ...
Get Core J2EE™ Patterns: Best Practices and Design Strategies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.