• It is now possible to catch differences in remote interfaces and bean implementa-
tions during the compilation phase.
• The implementation of business interface ensures consistency.
• The code or layer redundancy associated with the business delegate is removed
because the page controllers use the proxy business interface implementations.
• Because the EJBs are now invoked through proxied objects that implement simple
Java interfaces, it is easy to remove EJB dependencies and deploy the application in
web servers like Apache Tomcat.
• The business interface is not reusable across local and remote stateless session
• It increases the number of classes that you already are maintaining for EJBs.
• Performance overhead is added because EJB methods are now invoked by reflec-
tion from the proxies.
In this chapter, you explored different ways of building a flexible business layer combin-
ing Spring and EJB—a stateless session bean, to be specific. The Service Locator and
Business Delegate patterns are client-side extensions of the business logic exposed as
remote objects. The Session Facade pattern provides coarse-grained access to the busi-
ness logic as well as gives them access to the robust infrastructure support provided by
the container. The Application Service pattern describes a simple yet flexible mechanism
for encapsulating business logic in POJO components. The Business Interface pattern
allows compile-time checks on exposed business methods and reduces dependency on