Remember that this singleton is for that spring factory only. There can be following possibilities:
- Another bean with same name in a different factory.
- bean with different name and same class
- an object instantiated of the same class outside the factory.
This singleton is different from what we understand as singleton
pattern. For a discussion see at Spring Beans section at
Spring Tutorial