0 Replies Latest reply on Dec 26, 2002 4:26 PM by Ahmed

    Service Locator implementaion for PetStore

    Ahmed Newbie


      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