The main objective of the Enterprise JavaBeans (EJB) 3.0 specification is to improve the EJB architecture by reducing its complexity from the developer’s point of view. EJB’s new features include support for:
default values for a configuration
simplified access of environmental dependencies and external resources
simplified session and entity beans
enhanced support for checked exceptions
elimination of callback interfaces
The persistence and object/relational model in EJB3.0 is the Java Persitence API (JPA).
EJB 3.0 metadata annotations reduce the code required and make the deployment descriptors redundant. The local/remote and local home/home interfaces are not required in EJB 3.0 entity beans, and only a POJO class is required for an entity bean. The Java Persitence API provides an object-relational mapping model. Interceptors, simplified checked exceptions, and callback interfaces are some of the other new features in EJB 3.0.
Source: EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g, Vohra, D., pp. 7-22
I was studying how to develop enterprise applications through this book. After I have followed all steps indicated from the book I was curious about files from jpacontroller folder. All those files contains word Facade at the end.
So what that means? I presume that means a design pattern called Facade Pattern is used. From that, I have another question: what is Facade Pattern job?
According to this source, Facade Pattern simplify the interface to large body code. Look at the image below and compare the difference.
Facade Pattern is used when it is necessary to have a cleaner code and a separation of front-end presentation and back end functionality.