Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Communication between Business Objects

 
Sanz Vai
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SessionEJB A talks to ADAO to access functions related to A. So A has a method a1() which in turn calls method a11() in ADAO.

SessionEJB B talks to BDAO to access functions related to B. If B needs some data that can be provided by ADAO, should it directly call a11() or should it call a1() i.e. first locate A, then call a1().

Give me your logic for and against.
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanz,
I would have SessionEJB B call SessionEJBA method a1() (i.e. it would not call a11() directly).

Reasons are;
In the future, DAO's may be replaced. This could be by using entity beans or JDO's. If SesionEJB B called the DAO directly it would have to change also. By calling SessionEJB A instead of its DAO, you are future proofing the design.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic