• Post Reply Bookmark Topic Watch Topic
  • New Topic

why use two servicelocator?

 
chao cai
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see the post here said use two servicelocator one for web tier and one for business tier,Why?
 
Ali Reza Hosseini
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think this is because in the web tier you need to access some session beans as facades to the business tier, so you use a service locator.

on the other hand in the business tier from a session bean you need to access some other components such as entity beans or other session beans.
therefor you need here a service locator also ..
 
chao cai
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion ,one is enough you can the getHome/getLocalHome method provide by servicelocator will return the EJBHome/EJBLocalHome,not the special EJBHome such as XXXHome.
 
money grubbing section goes here:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!