1 Reply Latest reply on Jan 10, 2005 2:34 AM by jigneshsr

    serviceLocator pattern used correctly

      hi ,
      the service locator pattern advise to use a locator to get the context from a contextFactory and return the home IF to the client to apply the create method ,

      now if its all about decoupling the lookup code from the client -
      isnt it wiser that the serviceFactory will return the home interfaces to the locator(singleton) which will be bound to the application's context , and for every call for service will create a remoteInterface and deliver it to the client's helper

        • 1. Re: serviceLocator pattern used correctly
          jigneshsr

          Actuallly what are u talking about is the enhancement to the servicelocator. The solution is much simpler but u should know which remoteInterface u need to return to the client. To achieve this, best way is to map the request from the client using some fixed constants.