In the spring bean configurations, bean attribute called 'scope' defines what kind of object has to created and returned. There are 5 types of bean scopes available, they are:
1) singleton: Returns a single bean instance per Spring IoC container.
2) prototype: Returns a new bean instance each time when requested.
3) request: Returns a single instance for every HTTP request call.
4) session: Returns a single instance for every HTTP session.
5) global session: global session scope is equal as session scope on portlet-based web applications.
If no bean scope is specified in bean configuration file, then it will be by default 'singleton'.
|