Why use Facade pattern for EJB session bean

后端 未结 3 1641

I want to ask what is the reason to use Facade Pattern when access EJB Session Bean. In my Netbeans 6.9.1, if I do New > Sessions Bean for Entity Classes<

3条回答
  •  孤城傲影
    2020-12-15 23:36

    I think you should have one AbstractFacade for typical CRUD operations as you can see and many SpecificFacade for manipulating a given entity. So you can not reimplement the same basic logic many times just one... and concentrate only on more complex logic (transactions) associated with entities.

提交回复
热议问题