Friday 22 April 2011

Spring scopes



Default is singleton!



  • singleton Creates a single bean instance per Spring IoC container
  • prototype Creates a new bean instance each time when requested
  • request Creates a single bean instance per HTTP request; valid only in the context of a web application
  • session Creates a single bean instance per HTTP session; valid only in the context of a web application
  • globalSession Creates a single bean instance per global HTTP session; valid only in the context of a portal application


No comments:

Post a Comment