This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ServiceLocator in Pet Store  RSS feed

 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am browsing Pet Store 1.3.1 from Sun.
Any body can give me a reason why they use one service locator for web tier and the other for Business/EJB tier. The only difference I noticed is the web tier service locator "cache" the references.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could it be because of (some of) the following:
a) they wanted to demonstrate two different ways of implementing the service locator pattern.
b) they didn't have the time/interest to write a configurable service locator (cache on/off)
I'm just guessing here...
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
c) They wanted to decouple the Web and EJB tiers. Therefore making it much easier to locate them on separate JVMs or even separate physical boxes.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!