Search code examples
sessionjakarta-eedesign-patternsfacade

What are the advantages and disadvantages of the Session Façade Core J2EE Pattern?


What are the advantages and disadvantages of the Session Façade Core J2EE Pattern?

What are the assumptions behind it?

Are these assumptions valid in a particular environment?


Solution

  • Session Facade is a fantastic pattern - it is really a specific version of the Business Facade pattern. The idea is to tie up business functionality into discrete bundles - such as TransferMoney(), Withdraw(), Deposit()... So that your UI code is accessing things in terms of business operations instead of low level data access or other details that it shouldn't have to be concerned with.

    Specifically with the Session Facade - you use a Session EJB to act as the business facade - which is nice cause then you can take advantage of all the J2EE services (authentication/authorization, transactions, etc)...

    Hope that helps...