PetStore use two service locator class, one for the web
http://java.sun.com/blueprints/code/jps131/src/com/sun/j2ee/blueprints/servicelocator/web/ServiceLocator.java.html
and another one for ejb
http://java.sun.com/blueprints/code/jps131/src/com/sun/j2ee/blueprints/servicelocator/ejb/ServiceLocator.java.html
as explanied on this topic
http://java.sun.com/blueprints/patterns/ServiceLocator.html
I wonder why they have made the Web-tier class is a singleton, and caches the objects it looks up, while the EJB-tier class is not a singleton, and does not cache?
Does any body have a clue
thanks