From the course: Java EE: Design Patterns and Architecture

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Implement the Facade pattern

Implement the Facade pattern

From the course: Java EE: Design Patterns and Architecture

Start my 1-month free trial

Implement the Facade pattern

- [Instructor] Okay, so let's have a look at the code that goes behind the example in the previous video. So, here we have our banking system, and here we have a subsystem represented by the package, subsystems, and here we have the different subsystems. So, we have the credit rating service, we have the internal bank policy service, the repayment payability service, the repayment service, and then the transfer service. So, let's open our banking system. This is going to be our facade and here is the one method call that the bank manager makes to process the application. So, he calls the method process loan application. Now, because the banking system is a Java EE application, the subsystem services are a special type of bean called an Enterprise JavaBean. An EJB is a POJO that is annotated either stateless, stateful, or singleton. I'll talk more about this in the next video, but in this example, as you can see, I have already annotated those services stateless. So what remains is to…

Contents