Business Delegate implemented as EJB versus POJO ??

Discussions

EJB design: Business Delegate implemented as EJB versus POJO ??

  1. Hi,

    there is a debate ongoing in a project I'm working on. wondering if you could help.

    We have decided to go with the Business Delegate pattern. Now most of the team want to implement it as a POJO but some want to implement it as an EJB (stateless).

    Have you ever seen a case where EJB would be the preffered implementation? I honestly thought that the use of business delegates were to seperate implementation decisions (like EJBs) from the view and that making the business delegate an EJB would defeat the purpose.

    What would be the pros/cons of making the business delegate an EJB?

    I should mention that this is a web application using struts running on weblogic 8.1.

    With the above in mind, would making the business delegate a static pojo be any good?

    Thanks for your input!

    newbie.
  2. Hi,
      The very reason of using a business delegate pattern is to hide to cross tier implementation details (lookup , remote stubs ) etc from the client . Using the business delegate as and EJB does not solve that because the client is still bound to a specific implementation and has to still know the lookup and remote stub details. Hence my suggesstion would be go for POJO . Hope this helps

    Cheers