The petstore application uses a facade session bean as a single interface to other enterprise bean business objects.
When a web tier controller receives the requests from the client, it then passes the event to the EJBtier controller, implemented as a session bean, which matches the event to the proper command(Command Pattern). Ultimately, the command invokes the appropriate action on a session facade, which executes the business logic.
The facade encapsulates and hides the complexityof these business objects from clients. In addition, because their implementation details are kept hidden by a facade, the objects can change without affecting the clients.
When a web tier controller receives the requests from the client, it then passes the event to the EJBtier controller, implemented as a session bean, which matches the event to the proper command(Command Pattern). Ultimately, the command invokes the appropriate action on a session facade, which executes the business logic.
The facade encapsulates and hides the complexityof these business objects from clients. In addition, because their implementation details are kept hidden by a facade, the objects can change without affecting the clients.