Dependency injection and the bean scope