Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Business Delegate and Session beans

 
Ashwath Rangan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am neither very familiar with BD nor EJB. So please correct me if anything that I say is wrong.

I am deevloping an EJB2 application. We have different components and each component is a session bean. Now i am trying to implement the BD pattern.

From my understanding the BD class will be in the presentation tier. Now wat I am not clear about is will all the Service beans have its own BD class.

Say I have 2 components Staff and Students or will it be just one BD tat calls up a Service Locater to get the Service bean depending on the type of request.

Thanks

 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From my understanding the BD class will be in the presentation tier. Now wat I am not clear about is will all the Service beans have its own BD class.


The Business Delegate design pattern can be implemented on either the Presentation tier or the Business tier. It depends upon the design and the requirements.

No, each Session EJB should not have its own Business Delegate object. Note, think in objects not classes. A class is only a blueprint, it is a description. In object-oriented programming, objects execute at runtime, not classes.

The Business Delegate API exposes the business methods that are implemented by the Session EJB. So, in your example, if your Staff EJB has two business methods and your Students EJB has five business methods, then your Business Delegate can have five business methods in its API.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic