• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Business Delegate with EJB3

 
Aditya Kumar
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is about the Business Delegate (BD) pattern with the EJB context. I am aware that it is not much used since EJB3 introduced dependency injection.

But, say, if we still need to use the BD, and there are arguments for it too- is there a more modern rendition of it anywhere? Or do we still have to use the classic BD-Service-Locator-looking-for-the-EJB way?

Thanks,
aditya
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't seen a more modern rendition. As you noted, most of the time, dependency injection is used. The purpose of business delegate is to shield the caller from the remote service. If you get rid of the service locator, wouldn't that benefit disappear?
 
Aditya Kumar
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,
I think that would mean that we can't use Dependency Injection with Business Delegate? Because the BD is a POJO and thus not container managed, so in that case, we'll have to use the BD-Service locator, I guess. I searched for similar discussions here and that seems to be the conclusion. Can you please comment?
Thanks much for your response!
aditya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic