[ http://jira.andromda.org/browse/SPRING-132?page=comments#action_12293 ]
     
Peter Friese commented on SPRING-132:
-------------------------------------

The J2EE servicelocator pattern contains a method that does exactly what I 
proposed, see 
http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceLocator.html. 
Althought I very much like the idea of having a type safe access to the 
services managed by the service locator, I really would like to add this 
features.

Besides, adding the getService(String id) method allows the clients of the 
locator to retrieve services that have been loaded from an add-on 
applicationContext.xml file (using the beanref file).

> Add a method to Servicelocators that let's clients retrieve beans by their ID.
> ------------------------------------------------------------------------------
>
>          Key: SPRING-132
>          URL: http://jira.andromda.org/browse/SPRING-132
>      Project: Spring Cartridge
>         Type: Improvement
>     Versions: 3.1
>     Reporter: Peter Friese
>     Assignee: Peter Friese
>      Fix For: 3.1

>
> Sometimes, it is desirable to be able to retrieve a service by it's string 
> ID, like this:
> ServiceLocator.getService("serviceID");




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

Reply via email to