Julio,
I've tried that approach too, but I ended up not choosing it for various reasons:
- dependency on "magic" strings (your aliases)
- the default implementations would still get loaded even if you provide your own implementation, which means a larger memory footprint (could be mediated with lazy beans, but still something to be avoided).
- it just ended up more difficult than the current solution (now you have type safety, something you don't have when using property file based injection with aliases, and something I find quite important)
Also, the only reason why I'd use a property file for certain things, is for those things I expect to change in production environments. As far as I know, being able to switch implementations of services while in production isn't a good practice. Which implementations you inject just isn't something you should be able to configure and change at runtime.
Perhaps a couple percent of the applications out there may need a functionality like this, but that doesn't justify the potential increased complexity.
MSN: PM me please
Skype: doclo_lieven
Spring Rich Client Project Lead