SpringSource Spring Framework tutorials and examples. Focusing on Spring 3 and above.
You can easily declare the bean scope for the bean when you define a bean in Spring. Whenever a new bean instanace is required by you, bean scope attribute is declared as prototype to force the Spring to produce the bean instance. Also whenever you are looking for the same bean instance from the Spring, the bean scope instance is declared as singleton.
The following five scopes are supported by the Spring framework. In case of a web aware ApplicationContext, only three scopes are available.